@lidofinance/lsv-cli 1.0.0-alpha.23 → 1.0.0-alpha.25
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 +15 -44
- package/dist/abi/BlsHarness.js +232 -0
- package/dist/abi/BlsHarness.js.map +1 -0
- package/dist/abi/CLProofVerifier.js +47 -79
- package/dist/abi/CLProofVerifier.js.map +1 -1
- package/dist/abi/Dashboard.js +618 -196
- package/dist/abi/Dashboard.js.map +1 -1
- package/dist/abi/LidoLocator.js +7 -7
- package/dist/abi/LidoLocator.js.map +1 -1
- package/dist/abi/{Delegation.js → OperatorGrid.js} +466 -1067
- package/dist/abi/OperatorGrid.js.map +1 -0
- package/dist/abi/PredepositGuarantee.js +69 -13
- package/dist/abi/PredepositGuarantee.js.map +1 -1
- package/dist/abi/StEth.js +341 -341
- package/dist/abi/StEth.js.map +1 -1
- package/dist/abi/StakingVault.js +207 -73
- package/dist/abi/StakingVault.js.map +1 -1
- package/dist/abi/VaultFactory.js +67 -104
- package/dist/abi/VaultFactory.js.map +1 -1
- package/dist/abi/VaultHub.js +347 -237
- package/dist/abi/VaultHub.js.map +1 -1
- package/dist/abi/WstEth.js +478 -0
- package/dist/abi/WstEth.js.map +1 -0
- package/dist/abi/index.js +5 -2
- package/dist/abi/index.js.map +1 -1
- package/dist/configs/constants.js +2 -2
- package/dist/configs/constants.js.map +1 -1
- package/dist/configs/deployed.js +21 -47
- package/dist/configs/deployed.js.map +1 -1
- package/dist/configs/envs.js +5 -6
- package/dist/configs/envs.js.map +1 -1
- package/dist/configs/utils.js +4 -8
- package/dist/configs/utils.js.map +1 -1
- package/dist/contracts/blsHarness.js +24 -0
- package/dist/contracts/blsHarness.js.map +1 -0
- package/dist/contracts/clProofVerifier.js +4 -10
- package/dist/contracts/clProofVerifier.js.map +1 -1
- package/dist/contracts/index.js +3 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/locator.js +3 -3
- package/dist/contracts/locator.js.map +1 -1
- package/dist/contracts/operator-grid.js +17 -0
- package/dist/contracts/operator-grid.js.map +1 -0
- package/dist/contracts/pdg.js +2 -2
- package/dist/contracts/pdg.js.map +1 -1
- package/dist/contracts/reportChecker.js +4 -5
- package/dist/contracts/reportChecker.js.map +1 -1
- package/dist/contracts/steth.js +3 -3
- package/dist/contracts/steth.js.map +1 -1
- package/dist/contracts/token-manager.js +3 -3
- package/dist/contracts/token-manager.js.map +1 -1
- package/dist/contracts/vault-factory.js +2 -2
- package/dist/contracts/vault-factory.js.map +1 -1
- package/dist/contracts/vault-hub.js +3 -3
- package/dist/contracts/vault-hub.js.map +1 -1
- package/dist/contracts/vault-viewer.js +4 -6
- package/dist/contracts/vault-viewer.js.map +1 -1
- package/dist/contracts/vault.js +2 -2
- package/dist/contracts/vault.js.map +1 -1
- package/dist/contracts/voting.js +3 -3
- package/dist/contracts/voting.js.map +1 -1
- package/dist/contracts/wsteth.js +18 -0
- package/dist/contracts/wsteth.js.map +1 -0
- package/dist/features/advanced-config.js +3 -2
- package/dist/features/advanced-config.js.map +1 -1
- package/dist/features/dashboard.js +131 -0
- package/dist/features/dashboard.js.map +1 -0
- package/dist/features/index.js +8 -4
- package/dist/features/index.js.map +1 -1
- package/dist/features/operator-grid.js +57 -0
- package/dist/features/operator-grid.js.map +1 -0
- package/dist/features/pdg.js +79 -0
- package/dist/features/pdg.js.map +1 -0
- package/dist/features/vault-factory.js +33 -6
- package/dist/features/vault-factory.js.map +1 -1
- package/dist/features/vault-hub.js +81 -0
- package/dist/features/vault-hub.js.map +1 -0
- package/dist/features/vault.js +54 -0
- package/dist/features/vault.js.map +1 -0
- package/dist/features/voting.js +5 -9
- package/dist/features/voting.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/programs/account.js +107 -5
- package/dist/programs/account.js.map +1 -1
- package/dist/programs/config.js +2 -2
- package/dist/programs/config.js.map +1 -1
- package/dist/programs/dashboard/config.js +63 -17
- package/dist/programs/dashboard/config.js.map +1 -1
- package/dist/programs/dashboard/main.js +0 -7
- package/dist/programs/dashboard/main.js.map +1 -1
- package/dist/programs/dashboard/read.js +64 -42
- package/dist/programs/dashboard/read.js.map +1 -1
- package/dist/programs/dashboard/write.js +259 -155
- package/dist/programs/dashboard/write.js.map +1 -1
- package/dist/programs/hub/config.js +28 -32
- package/dist/programs/hub/config.js.map +1 -1
- package/dist/programs/hub/main.js +0 -7
- package/dist/programs/hub/main.js.map +1 -1
- package/dist/programs/hub/read.js +30 -35
- package/dist/programs/hub/read.js.map +1 -1
- package/dist/programs/hub/write.js +148 -40
- package/dist/programs/hub/write.js.map +1 -1
- package/dist/programs/index.js +1 -1
- package/dist/programs/index.js.map +1 -1
- package/dist/programs/operator-grid/config.js +81 -0
- package/dist/programs/operator-grid/config.js.map +1 -0
- package/dist/programs/operator-grid/index.js.map +1 -0
- package/dist/programs/operator-grid/main.js +5 -0
- package/dist/programs/operator-grid/main.js.map +1 -0
- package/dist/programs/operator-grid/read.js +24 -0
- package/dist/programs/operator-grid/read.js.map +1 -0
- package/dist/programs/operator-grid/write.js +109 -0
- package/dist/programs/operator-grid/write.js.map +1 -0
- package/dist/programs/pdg/config.js +49 -13
- package/dist/programs/pdg/config.js.map +1 -1
- package/dist/programs/pdg/main.js +0 -7
- package/dist/programs/pdg/main.js.map +1 -1
- package/dist/programs/pdg/read.js +20 -3
- package/dist/programs/pdg/read.js.map +1 -1
- package/dist/programs/pdg/write.js +147 -82
- package/dist/programs/pdg/write.js.map +1 -1
- package/dist/programs/pdg-helpers.js +155 -38
- package/dist/programs/pdg-helpers.js.map +1 -1
- package/dist/programs/report.js +66 -78
- package/dist/programs/report.js.map +1 -1
- package/dist/programs/vault/config.js +6 -2
- package/dist/programs/vault/config.js.map +1 -1
- package/dist/programs/vault/main.js +0 -7
- package/dist/programs/vault/main.js.map +1 -1
- package/dist/programs/vault/read.js +16 -44
- package/dist/programs/vault/read.js.map +1 -1
- package/dist/programs/vault/write.js +117 -33
- package/dist/programs/vault/write.js.map +1 -1
- package/dist/programs/vault-factory/main.js +0 -7
- package/dist/programs/vault-factory/main.js.map +1 -1
- package/dist/programs/vault-factory/read.js +17 -19
- package/dist/programs/vault-factory/read.js.map +1 -1
- package/dist/programs/vault-factory/write.js +30 -52
- package/dist/programs/vault-factory/write.js.map +1 -1
- package/dist/programs/vault-viewer/main.js +2 -2
- package/dist/programs/vault-viewer/main.js.map +1 -1
- package/dist/programs/voting.js +8 -23
- package/dist/programs/voting.js.map +1 -1
- package/dist/providers/wallet.js +4 -4
- package/dist/providers/wallet.js.map +1 -1
- package/dist/utils/arguments.js +44 -1
- package/dist/utils/arguments.js.map +1 -1
- package/dist/utils/bls.js +101 -0
- package/dist/utils/bls.js.map +1 -0
- package/dist/utils/commands/dashboard.js +103 -0
- package/dist/utils/commands/dashboard.js.map +1 -0
- package/dist/utils/commands/index.js +2 -0
- package/dist/utils/commands/index.js.map +1 -0
- package/dist/utils/contract.js +54 -15
- package/dist/utils/contract.js.map +1 -1
- package/dist/utils/data-validators.js +7 -22
- package/dist/utils/data-validators.js.map +1 -1
- package/dist/utils/error-handler.js +5 -2
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/fetchCL.js +57 -0
- package/dist/utils/fetchCL.js.map +1 -0
- package/dist/utils/get-deposit-data-root.js +3 -3
- package/dist/utils/health.js +69 -7
- package/dist/utils/health.js.map +1 -1
- package/dist/utils/index.js +6 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/ipfs.js +54 -0
- package/dist/utils/ipfs.js.map +1 -0
- package/dist/utils/logging/console.js +23 -0
- package/dist/utils/logging/console.js.map +1 -0
- package/dist/utils/logging/constants.js +12 -0
- package/dist/utils/logging/constants.js.map +1 -0
- package/dist/utils/logging/index.js +2 -0
- package/dist/utils/logging/index.js.map +1 -0
- package/dist/utils/prompts/dashboard.js +63 -0
- package/dist/utils/prompts/dashboard.js.map +1 -0
- package/dist/utils/prompts/index.js +2 -1
- package/dist/utils/prompts/index.js.map +1 -1
- package/dist/utils/prompts/operations.js +41 -0
- package/dist/utils/prompts/operations.js.map +1 -0
- package/dist/utils/prompts/predeposit-guarantee.js +10 -13
- package/dist/utils/prompts/predeposit-guarantee.js.map +1 -1
- package/dist/utils/prompts/vault.js +4 -1
- package/dist/utils/prompts/vault.js.map +1 -1
- package/dist/utils/proof/create-proof.js +6 -30
- package/dist/utils/proof/create-proof.js.map +1 -1
- package/dist/utils/proof/first-validator-gindex.js +2 -1
- package/dist/utils/proof/first-validator-gindex.js.map +1 -1
- package/dist/utils/proof/merkle-utils.js +15 -3
- package/dist/utils/proof/merkle-utils.js.map +1 -1
- package/dist/utils/proof/report-proof.js +11 -6
- package/dist/utils/proof/report-proof.js.map +1 -1
- package/dist/utils/read-programs-by-abi.js +2 -2
- package/dist/utils/read-programs-by-abi.js.map +1 -1
- package/dist/utils/report.js +17 -17
- package/dist/utils/report.js.map +1 -1
- package/dist/utils/required-lock.js +21 -0
- package/dist/utils/required-lock.js.map +1 -0
- package/dist/version/index.js +1 -1
- package/package.json +10 -4
- package/dist/abi/Delegation.js.map +0 -1
- package/dist/contracts/delegation.js +0 -11
- package/dist/contracts/delegation.js.map +0 -1
- package/dist/features/dashboard-delegation.js +0 -25
- package/dist/features/dashboard-delegation.js.map +0 -1
- package/dist/programs/delegation/config.js +0 -33
- package/dist/programs/delegation/config.js.map +0 -1
- package/dist/programs/delegation/index.js.map +0 -1
- package/dist/programs/delegation/main.js +0 -12
- package/dist/programs/delegation/main.js.map +0 -1
- package/dist/programs/delegation/read.js +0 -104
- package/dist/programs/delegation/read.js.map +0 -1
- package/dist/programs/delegation/write.js +0 -323
- package/dist/programs/delegation/write.js.map +0 -1
- package/dist/utils/parse-string.js +0 -20
- package/dist/utils/parse-string.js.map +0 -1
- package/dist/utils/prompts/delegation-dashboard.js +0 -29
- package/dist/utils/prompts/delegation-dashboard.js.map +0 -1
- /package/dist/programs/{delegation → operator-grid}/index.js +0 -0
|
@@ -1,36 +1,4 @@
|
|
|
1
1
|
export const readCommandConfig = {
|
|
2
|
-
VAULT_MASTER_ROLE: {
|
|
3
|
-
name: 'vm-role',
|
|
4
|
-
description: 'get vault master role',
|
|
5
|
-
},
|
|
6
|
-
VAULT_REGISTRY_ROLE: {
|
|
7
|
-
name: 'vr-role',
|
|
8
|
-
description: 'get vault registry role',
|
|
9
|
-
},
|
|
10
|
-
LIDO: {
|
|
11
|
-
name: 'lido',
|
|
12
|
-
description: 'get lido address',
|
|
13
|
-
},
|
|
14
|
-
LIDO_LOCATOR: {
|
|
15
|
-
name: 'll',
|
|
16
|
-
description: 'get lido locator address',
|
|
17
|
-
},
|
|
18
|
-
DEFAULT_ADMIN_ROLE: {
|
|
19
|
-
name: 'dar',
|
|
20
|
-
description: 'get default admin role',
|
|
21
|
-
},
|
|
22
|
-
PAUSE_INFINITELY: {
|
|
23
|
-
name: 'pi',
|
|
24
|
-
description: 'get pause infinitely',
|
|
25
|
-
},
|
|
26
|
-
PAUSE_ROLE: {
|
|
27
|
-
name: 'pr',
|
|
28
|
-
description: 'get pause role',
|
|
29
|
-
},
|
|
30
|
-
RESUME_ROLE: {
|
|
31
|
-
name: 'rr',
|
|
32
|
-
description: 'get resume role',
|
|
33
|
-
},
|
|
34
2
|
calculateVaultTreasuryFees: {
|
|
35
3
|
name: 'calc-t-fee',
|
|
36
4
|
description: 'get calculated vault treasury fees',
|
|
@@ -123,5 +91,33 @@ export const readCommandConfig = {
|
|
|
123
91
|
},
|
|
124
92
|
},
|
|
125
93
|
},
|
|
94
|
+
batchVaultsInfo: {
|
|
95
|
+
name: 'batch-v-info',
|
|
96
|
+
description: 'get batch of vaults info',
|
|
97
|
+
arguments: {
|
|
98
|
+
_offset: {
|
|
99
|
+
name: 'offset',
|
|
100
|
+
description: 'offset of the vault in the batch (indexes start from 0)',
|
|
101
|
+
},
|
|
102
|
+
_limit: {
|
|
103
|
+
name: 'limit',
|
|
104
|
+
description: 'limit of the batch',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
isVaultHealthyAsOfLatestReport: {
|
|
109
|
+
name: 'is-v-healthy-latest-report',
|
|
110
|
+
description: 'get checks if the vault is healthy by comparing its total value after applying rebalance threshold against current liability shares',
|
|
111
|
+
arguments: {
|
|
112
|
+
_vault: {
|
|
113
|
+
name: 'vault',
|
|
114
|
+
description: 'vault address',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
latestReportData: {
|
|
119
|
+
name: 'latest-report-data',
|
|
120
|
+
description: 'get latest report data',
|
|
121
|
+
},
|
|
126
122
|
};
|
|
127
123
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../programs/hub/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAA6B;IACzD,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../programs/hub/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAA6B;IACzD,0BAA0B,EAAE;QAC1B,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,oCAAoC;QACjD,SAAS,EAAE;YACT,gBAAgB,EAAE;gBAChB,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,kBAAkB;aAChC;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,kBAAkB;aAChC;YACD,oBAAoB,EAAE;gBACpB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,wBAAwB;aACtC;YACD,mBAAmB,EAAE;gBACnB,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,sBAAsB;aACpC;YACD,kBAAkB,EAAE;gBAClB,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,qBAAqB;aACnC;YACD,2BAA2B,EAAE;gBAC3B,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,kCAAkC;aAChD;SACF;K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P,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yDAAyD;aACvE;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,oBAAoB;aAClC;SACF;KACF;IACD,8BAA8B,EAAE;QAC9B,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACT,qIAAqI;QACvI,SAAS,EAAE;YACT,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,eAAe;aAC7B;SACF;KACF;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,wBAAwB;KACtC;CACF,CAAC"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { program } from '../../command/index.js';
|
|
2
|
-
import { Option } from 'commander';
|
|
3
|
-
import { getCommandsJson } from '../../utils/index.js';
|
|
4
2
|
export const vaultHub = program
|
|
5
3
|
.command('hub')
|
|
6
4
|
.description('vault hub contract');
|
|
7
|
-
vaultHub.addOption(new Option('-cmd2json'));
|
|
8
|
-
vaultHub.on('option:-cmd2json', function () {
|
|
9
|
-
console.info(getCommandsJson(vaultHub));
|
|
10
|
-
process.exit();
|
|
11
|
-
});
|
|
12
5
|
//# sourceMappingURL=main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../programs/hub/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../programs/hub/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO;KAC5B,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,45 +1,33 @@
|
|
|
1
|
+
import { Option } from 'commander';
|
|
1
2
|
import { getVaultHubContract } from '../../contracts/index.js';
|
|
2
|
-
import {
|
|
3
|
+
import { getVaultHubBaseInfo, getVaultHubRoles } from '../../features/index.js';
|
|
4
|
+
import { generateReadCommands, printError, callReadMethod, logResult, getCommandsJson, logInfo, stringToAddress, } from '../../utils/index.js';
|
|
3
5
|
import { VaultHubAbi } from '../../abi/index.js';
|
|
4
6
|
import { vaultHub } from './main.js';
|
|
5
7
|
import { readCommandConfig } from './config.js';
|
|
8
|
+
const VaultHubRead = vaultHub
|
|
9
|
+
.command('read')
|
|
10
|
+
.aliases(['r'])
|
|
11
|
+
.description('vault hub read commands');
|
|
12
|
+
VaultHubRead.addOption(new Option('-cmd2json'));
|
|
13
|
+
VaultHubRead.on('option:-cmd2json', function () {
|
|
14
|
+
logInfo(getCommandsJson(VaultHubRead));
|
|
15
|
+
process.exit();
|
|
16
|
+
});
|
|
6
17
|
// Works fine
|
|
7
|
-
|
|
8
|
-
.
|
|
9
|
-
.description('get vault hub constants')
|
|
18
|
+
VaultHubRead.command('info')
|
|
19
|
+
.description('get vault hub info')
|
|
10
20
|
.action(async () => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const DEFAULT_ADMIN_ROLE = await contract.read.DEFAULT_ADMIN_ROLE();
|
|
18
|
-
const PAUSE_INFINITELY = await contract.read.PAUSE_INFINITELY();
|
|
19
|
-
const PAUSE_ROLE = await contract.read.PAUSE_ROLE();
|
|
20
|
-
const RESUME_ROLE = await contract.read.RESUME_ROLE();
|
|
21
|
-
const CONTRACT_ADDRESS = contract.address;
|
|
22
|
-
const payload = {
|
|
23
|
-
VAULT_MASTER_ROLE,
|
|
24
|
-
DEFAULT_ADMIN_ROLE,
|
|
25
|
-
VAULT_REGISTRY_ROLE,
|
|
26
|
-
LIDO,
|
|
27
|
-
LIDO_LOCATOR,
|
|
28
|
-
PAUSE_INFINITELY,
|
|
29
|
-
PAUSE_ROLE,
|
|
30
|
-
RESUME_ROLE,
|
|
31
|
-
CONTRACT_ADDRESS,
|
|
32
|
-
};
|
|
33
|
-
console.table(Object.entries(payload));
|
|
34
|
-
}
|
|
35
|
-
catch (err) {
|
|
36
|
-
printError(err, 'Error when calling read method "constants"');
|
|
37
|
-
}
|
|
21
|
+
await getVaultHubBaseInfo();
|
|
22
|
+
});
|
|
23
|
+
VaultHubRead.command('roles')
|
|
24
|
+
.description('get vault hub roles')
|
|
25
|
+
.action(async () => {
|
|
26
|
+
await getVaultHubRoles();
|
|
38
27
|
});
|
|
39
|
-
generateReadCommands(VaultHubAbi, getVaultHubContract,
|
|
28
|
+
generateReadCommands(VaultHubAbi, getVaultHubContract, VaultHubRead, readCommandConfig);
|
|
40
29
|
// // Works fine
|
|
41
|
-
|
|
42
|
-
.command('vi')
|
|
30
|
+
VaultHubRead.command('vi')
|
|
43
31
|
.description('get vault and vault socket by index')
|
|
44
32
|
.argument('<index>', 'index')
|
|
45
33
|
.action(async (index) => {
|
|
@@ -50,7 +38,7 @@ vaultHub
|
|
|
50
38
|
const vaultSocket = await callReadMethod(contract, 'vaultSocket', [
|
|
51
39
|
biIndex,
|
|
52
40
|
]);
|
|
53
|
-
|
|
41
|
+
logResult({
|
|
54
42
|
Vault: vault,
|
|
55
43
|
'Vault Socket': vaultSocket,
|
|
56
44
|
});
|
|
@@ -59,4 +47,11 @@ vaultHub
|
|
|
59
47
|
printError(err, 'Error when getting vault and vault socket');
|
|
60
48
|
}
|
|
61
49
|
});
|
|
50
|
+
VaultHubRead.command('rebalance-shortfall')
|
|
51
|
+
.description('estimate ether amount to make the vault healthy using rebalance')
|
|
52
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
53
|
+
.action(async (address) => {
|
|
54
|
+
const contract = await getVaultHubContract();
|
|
55
|
+
await callReadMethod(contract, 'rebalanceShortfall', [address]);
|
|
56
|
+
});
|
|
62
57
|
//# sourceMappingURL=read.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../programs/hub/read.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../programs/hub/read.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,SAAS,EACT,eAAe,EACf,OAAO,EACP,eAAe,GAChB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,YAAY,GAAG,QAAQ;KAC1B,OAAO,CAAC,MAAM,CAAC;KACf,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;KACd,WAAW,CAAC,yBAAyB,CAAC,CAAC;AAE1C,YAAY,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAChD,YAAY,CAAC,EAAE,CAAC,kBAAkB,EAAE;IAClC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC,CAAC,CAAC;AAEH,aAAa;AACb,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC;KACzB,WAAW,CAAC,oBAAoB,CAAC;KACjC,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,mBAAmB,EAAE,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEL,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC;KAC1B,WAAW,CAAC,qBAAqB,CAAC;KAClC,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,gBAAg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|
1
|
+
import { parseEther } from 'viem';
|
|
2
|
+
import { Option } from 'commander';
|
|
3
|
+
import { getOperatorGridContract, getVaultHubContract } from '../../contracts/index.js';
|
|
4
|
+
import { callReadMethod, callWriteMethodWithReceipt, confirmOperation, getCommandsJson, logInfo, stringToAddress, stringToBigInt, } from '../../utils/index.js';
|
|
3
5
|
import { vaultHub } from './main.js';
|
|
4
|
-
vaultHub
|
|
5
|
-
.command('
|
|
6
|
+
const VaultHubWrite = vaultHub
|
|
7
|
+
.command('write')
|
|
8
|
+
.aliases(['w'])
|
|
9
|
+
.description('vault hub write commands');
|
|
10
|
+
VaultHubWrite.addOption(new Option('-cmd2json'));
|
|
11
|
+
VaultHubWrite.on('option:-cmd2json', function () {
|
|
12
|
+
logInfo(getCommandsJson(VaultHubWrite));
|
|
13
|
+
process.exit();
|
|
14
|
+
});
|
|
15
|
+
VaultHubWrite.command('add-codehash')
|
|
6
16
|
.description('add vault proxy codehash to allowed list')
|
|
7
17
|
.argument('<codehash>', 'codehash vault proxy codehash')
|
|
8
18
|
.action(async (codehash) => {
|
|
9
19
|
const contract = await getVaultHubContract();
|
|
20
|
+
const confirm = await confirmOperation(`Are you sure you want to add the vault proxy codehash to the allowed list?
|
|
21
|
+
${codehash}`);
|
|
22
|
+
if (!confirm)
|
|
23
|
+
return;
|
|
10
24
|
await callWriteMethodWithReceipt(contract, 'addVaultProxyCodehash', [
|
|
11
25
|
codehash,
|
|
12
26
|
]);
|
|
13
27
|
});
|
|
14
28
|
// TODO: replace by voting
|
|
15
|
-
|
|
16
|
-
.command('v-connect')
|
|
29
|
+
VaultHubWrite.command('v-connect')
|
|
17
30
|
.description('connects a vault to the hub (vault master role needed)')
|
|
18
|
-
.argument('<address>', 'vault address')
|
|
19
|
-
.
|
|
20
|
-
.argument('<reserveRatio>', 'minimum Reserve ratio in basis points')
|
|
21
|
-
.argument('<reserveRatioThreshold>', 'reserve ratio that makes possible to force rebalance on the vault (in basis points)')
|
|
22
|
-
.argument('<treasuryFeeBP>', 'treasury fee in basis points')
|
|
23
|
-
.action(async (address, shareLimit, reserveRatio, reserveRatioThreshold, treasuryFeeBP) => {
|
|
31
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
32
|
+
.action(async (address) => {
|
|
24
33
|
const contract = await getVaultHubContract();
|
|
25
|
-
await
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
]);
|
|
34
|
+
const operatorGridContract = await getOperatorGridContract();
|
|
35
|
+
const [shareLimit, reserveRatio, reserveRatioThreshold, treasuryFeeBP] = await callReadMethod(operatorGridContract, 'vaultInfo', [address]);
|
|
36
|
+
const confirm = await confirmOperation(`Are you sure you want to connect the vault ${address} with share limit ${shareLimit}, reserve ratio ${reserveRatio}, reserve ratio threshold ${reserveRatioThreshold}, treasury fee ${treasuryFeeBP}?`);
|
|
37
|
+
if (!confirm)
|
|
38
|
+
return;
|
|
39
|
+
await callWriteMethodWithReceipt(contract, 'connectVault', [address]);
|
|
32
40
|
});
|
|
33
|
-
|
|
34
|
-
.command('v-update-share-limit')
|
|
41
|
+
VaultHubWrite.command('v-update-share-limit')
|
|
35
42
|
.description('updates share limit for the vault')
|
|
36
|
-
.argument('<address>', 'vault address')
|
|
43
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
37
44
|
.argument('<shareLimit>', 'share limit', stringToBigInt)
|
|
38
45
|
.action(async (address, shareLimit) => {
|
|
39
46
|
const contract = await getVaultHubContract();
|
|
47
|
+
const confirm = await confirmOperation(`Are you sure you want to update the share limit for the vault ${address} to ${shareLimit}?`);
|
|
48
|
+
if (!confirm)
|
|
49
|
+
return;
|
|
40
50
|
await callWriteMethodWithReceipt(contract, 'updateShareLimit', [
|
|
41
51
|
address,
|
|
42
52
|
shareLimit,
|
|
43
53
|
]);
|
|
44
54
|
});
|
|
45
|
-
|
|
46
|
-
.command('v-disconnect')
|
|
55
|
+
VaultHubWrite.command('v-disconnect')
|
|
47
56
|
.description('force disconnects a vault from the hub')
|
|
48
|
-
.argument('<address>', 'vault address')
|
|
57
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
49
58
|
.action(async (address) => {
|
|
50
59
|
const contract = await getVaultHubContract();
|
|
60
|
+
const confirm = await confirmOperation(`Are you sure you want to force disconnect the vault ${address}?`);
|
|
61
|
+
if (!confirm)
|
|
62
|
+
return;
|
|
51
63
|
await callWriteMethodWithReceipt(contract, 'disconnect', [address]);
|
|
52
64
|
});
|
|
53
|
-
|
|
54
|
-
.command('v-owner-disconnect')
|
|
65
|
+
VaultHubWrite.command('v-owner-disconnect')
|
|
55
66
|
.description("disconnects a vault from the hub, msg.sender should be vault's owner")
|
|
56
|
-
.argument('<address>', 'vault address')
|
|
67
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
57
68
|
.action(async (address) => {
|
|
58
69
|
const contract = await getVaultHubContract();
|
|
70
|
+
const confirm = await confirmOperation(`Are you sure you want to disconnect the vault ${address}?`);
|
|
71
|
+
if (!confirm)
|
|
72
|
+
return;
|
|
59
73
|
await callWriteMethodWithReceipt(contract, 'voluntaryDisconnect', [
|
|
60
74
|
address,
|
|
61
75
|
]);
|
|
62
76
|
});
|
|
63
|
-
|
|
64
|
-
.command('v-mint')
|
|
77
|
+
VaultHubWrite.command('v-mint')
|
|
65
78
|
.description(' mint StETH shares backed by vault external balance to the receiver address')
|
|
66
|
-
.argument('<address>', 'vault address')
|
|
79
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
67
80
|
.argument('<recipient>', 'address of the receiver')
|
|
68
81
|
.argument('<amountOfShares>', 'amount of stETH shares to mint')
|
|
69
82
|
.action(async (address, recipient, amountOfShares) => {
|
|
70
83
|
const contract = await getVaultHubContract();
|
|
84
|
+
const confirm = await confirmOperation(`Are you sure you want to mint ${amountOfShares} stETH shares to ${recipient}?`);
|
|
85
|
+
if (!confirm)
|
|
86
|
+
return;
|
|
71
87
|
await callWriteMethodWithReceipt(contract, 'mintShares', [
|
|
72
88
|
address,
|
|
73
89
|
recipient,
|
|
74
90
|
BigInt(amountOfShares),
|
|
75
91
|
]);
|
|
76
92
|
});
|
|
77
|
-
|
|
78
|
-
.command('v-burn')
|
|
93
|
+
VaultHubWrite.command('v-burn')
|
|
79
94
|
.description('burn steth shares from the balance of the VaultHub contract')
|
|
80
|
-
.argument('<address>', 'vault address')
|
|
95
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
81
96
|
.argument('<amountOfShares>', 'amount of stETH shares to mint')
|
|
82
97
|
.action(async (address, amountOfShares) => {
|
|
83
98
|
const contract = await getVaultHubContract();
|
|
99
|
+
const confirm = await confirmOperation(`Are you sure you want to burn ${amountOfShares} stETH shares from vault ${address}?`);
|
|
100
|
+
if (!confirm)
|
|
101
|
+
return;
|
|
84
102
|
await callWriteMethodWithReceipt(contract, 'burnShares', [
|
|
85
103
|
address,
|
|
86
104
|
BigInt(amountOfShares),
|
|
87
105
|
]);
|
|
88
106
|
});
|
|
89
|
-
|
|
90
|
-
.command('v-transfer-and-burn')
|
|
107
|
+
VaultHubWrite.command('v-transfer-and-burn')
|
|
91
108
|
.description('separate burn function for EOA vault owners; requires vaultHub to be approved to transfer stETH')
|
|
92
|
-
.argument('<address>', 'vault address')
|
|
109
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
93
110
|
.argument('<amountOfShares>', 'amount of stETH shares to mint')
|
|
94
111
|
.action(async (address, amountOfShares) => {
|
|
95
112
|
const contract = await getVaultHubContract();
|
|
113
|
+
const confirm = await confirmOperation(`Are you sure you want to transfer and burn ${amountOfShares} stETH shares from vault ${address}?`);
|
|
114
|
+
if (!confirm)
|
|
115
|
+
return;
|
|
96
116
|
await callWriteMethodWithReceipt(contract, 'transferAndBurnShares', [
|
|
97
117
|
address,
|
|
98
118
|
BigInt(amountOfShares),
|
|
99
119
|
]);
|
|
100
120
|
});
|
|
101
|
-
|
|
102
|
-
.command('v-force-rebalance')
|
|
121
|
+
VaultHubWrite.command('v-force-rebalance')
|
|
103
122
|
.description('force rebalance of the vault to have sufficient reserve ratio')
|
|
104
|
-
.argument('<address>', 'vault address')
|
|
123
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
105
124
|
.action(async (address) => {
|
|
106
125
|
const contract = await getVaultHubContract();
|
|
126
|
+
const confirm = await confirmOperation(`Are you sure you want to force rebalance the vault ${address}?`);
|
|
127
|
+
if (!confirm)
|
|
128
|
+
return;
|
|
107
129
|
await callWriteMethodWithReceipt(contract, 'forceRebalance', [address]);
|
|
108
130
|
});
|
|
131
|
+
VaultHubWrite.command('v-update-connection')
|
|
132
|
+
.description('updates the vault`s connection parameters')
|
|
133
|
+
.argument('<address>', 'vault address', stringToAddress)
|
|
134
|
+
.argument('<shareLimit>', 'share limit', stringToBigInt)
|
|
135
|
+
.argument('<reserveRatio>', 'reserve ratio', stringToBigInt)
|
|
136
|
+
.argument('<reserveRatioThreshold>', 'reserve ratio threshold', stringToBigInt)
|
|
137
|
+
.argument('<treasuryFeeBP>', 'treasury fee', stringToBigInt)
|
|
138
|
+
.action(async (address, shareLimit, reserveRatio, reserveRatioThreshold, treasuryFeeBP) => {
|
|
139
|
+
const contract = await getVaultHubContract();
|
|
140
|
+
const confirm = await confirmOperation(`Are you sure you want to update the vault ${address} connection parameters to share limit ${shareLimit}, reserve ratio ${reserveRatio}, reserve ratio threshold ${reserveRatioThreshold}, treasury fee ${treasuryFeeBP}?`);
|
|
141
|
+
if (!confirm)
|
|
142
|
+
return;
|
|
143
|
+
await callWriteMethodWithReceipt(contract, 'updateConnection', [
|
|
144
|
+
address,
|
|
145
|
+
shareLimit,
|
|
146
|
+
reserveRatio,
|
|
147
|
+
reserveRatioThreshold,
|
|
148
|
+
treasuryFeeBP,
|
|
149
|
+
]);
|
|
150
|
+
});
|
|
151
|
+
VaultHubWrite.command('update-report-data')
|
|
152
|
+
.description('updates the report data for the vault')
|
|
153
|
+
.argument('<vaultsDataTimestamp>', 'vaults data timestamp', stringToBigInt)
|
|
154
|
+
.argument('<vaultsDataTreeRoot>', 'vaults data tree root')
|
|
155
|
+
.argument('<vaultsDataReportCid>', 'vaults data report cid')
|
|
156
|
+
.action(async (vaultsDataTimestamp, vaultsDataTreeRoot, vaultsDataReportCid) => {
|
|
157
|
+
const contract = await getVaultHubContract();
|
|
158
|
+
const confirm = await confirmOperation(`Are you sure you want to update the report data for the vaults data timestamp ${vaultsDataTimestamp}?`);
|
|
159
|
+
if (!confirm)
|
|
160
|
+
return;
|
|
161
|
+
await callWriteMethodWithReceipt(contract, 'updateReportData', [
|
|
162
|
+
vaultsDataTimestamp,
|
|
163
|
+
vaultsDataTreeRoot,
|
|
164
|
+
vaultsDataReportCid,
|
|
165
|
+
]);
|
|
166
|
+
});
|
|
167
|
+
VaultHubWrite.command('v-force-validator-exit')
|
|
168
|
+
.description('force validator exit')
|
|
169
|
+
.argument('<vaultAddress>', 'vault address', stringToAddress)
|
|
170
|
+
.argument('<validatorPubkey>', 'validator pubkey')
|
|
171
|
+
.argument('<refundRecipient>', 'refund recipient', stringToAddress)
|
|
172
|
+
.action(async (vaultAddress, validatorPubkey, refundRecipient) => {
|
|
173
|
+
const contract = await getVaultHubContract();
|
|
174
|
+
const confirm = await confirmOperation(`Are you sure you want to force validator exit for validator pubkey ${validatorPubkey} and refund recipient ${refundRecipient} in vault ${vaultAddress}?`);
|
|
175
|
+
if (!confirm)
|
|
176
|
+
return;
|
|
177
|
+
await callWriteMethodWithReceipt(contract, 'forceValidatorExit', [
|
|
178
|
+
vaultAddress,
|
|
179
|
+
validatorPubkey,
|
|
180
|
+
refundRecipient,
|
|
181
|
+
]);
|
|
182
|
+
});
|
|
183
|
+
VaultHubWrite.command('v-update-vault-data')
|
|
184
|
+
.description('permissionless update of the vault data')
|
|
185
|
+
.argument('<vaultAddress>', 'vault address', stringToAddress)
|
|
186
|
+
.argument('<totalValue>', 'total value', stringToBigInt)
|
|
187
|
+
.argument('<inOutDelta>', 'in/out delta', stringToBigInt)
|
|
188
|
+
.argument('<feeSharesCharged>', 'fee shares charged', stringToBigInt)
|
|
189
|
+
.argument('<liabilityShares>', 'liability shares', stringToBigInt)
|
|
190
|
+
.argument('<proof>', 'proof')
|
|
191
|
+
.action(async (vaultAddress, totalValue, inOutDelta, feeSharesCharged, liabilityShares, proof) => {
|
|
192
|
+
const contract = await getVaultHubContract();
|
|
193
|
+
const confirm = await confirmOperation(`Are you sure you want to update the vault data for the vault ${vaultAddress}?`);
|
|
194
|
+
if (!confirm)
|
|
195
|
+
return;
|
|
196
|
+
await callWriteMethodWithReceipt(contract, 'updateVaultData', [
|
|
197
|
+
vaultAddress,
|
|
198
|
+
totalValue,
|
|
199
|
+
inOutDelta,
|
|
200
|
+
feeSharesCharged,
|
|
201
|
+
liabilityShares,
|
|
202
|
+
proof,
|
|
203
|
+
]);
|
|
204
|
+
});
|
|
205
|
+
VaultHubWrite.command('mint-vaults-treasury-fee-shares')
|
|
206
|
+
.description('mint vaults treasury fee shares')
|
|
207
|
+
.argument('<amountOfShares>', 'amount of shares (in Shares)')
|
|
208
|
+
.action(async (amountOfShares) => {
|
|
209
|
+
const contract = await getVaultHubContract();
|
|
210
|
+
const confirm = await confirmOperation(`Are you sure you want to mint ${amountOfShares} treasury fee shares?`);
|
|
211
|
+
if (!confirm)
|
|
212
|
+
return;
|
|
213
|
+
await callWriteMethodWithReceipt(contract, 'mintVaultsTreasuryFeeShares', [
|
|
214
|
+
parseEther(amountOfShares),
|
|
215
|
+
]);
|
|
216
|
+
});
|
|
109
217
|
//# sourceMappingURL=write.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../programs/hub/write.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../programs/hub/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,uBAAuB,EAAE,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CAAiC,cAAc,uBAAuB,CACvE,CAAC;IACF,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,0BAA0B,CAAC,QAAQ,EAAE,6BAA6B,EAAE;QACxE,UAAU,CAAC,cAAc,CAAC;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/programs/index.js
CHANGED
|
@@ -4,9 +4,9 @@ export * from './pdg-helpers.js';
|
|
|
4
4
|
export * from './vault/index.js';
|
|
5
5
|
export * from './dashboard/index.js';
|
|
6
6
|
export * from './vault-factory/index.js';
|
|
7
|
-
export * from './delegation/index.js';
|
|
8
7
|
export * from './pdg/index.js';
|
|
9
8
|
export * from './hub/index.js';
|
|
10
9
|
export * from './vault-viewer/index.js';
|
|
11
10
|
export * from './report.js';
|
|
11
|
+
export * from './operator-grid/index.js';
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../programs/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../programs/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export const readCommandConfig = {
|
|
2
|
+
group: {
|
|
3
|
+
name: 'group',
|
|
4
|
+
description: 'get group by node operator address',
|
|
5
|
+
arguments: {
|
|
6
|
+
_nodeOperator: {
|
|
7
|
+
name: 'node-operator',
|
|
8
|
+
description: 'node operator address',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
nodeOperatorAddress: {
|
|
13
|
+
name: 'node-operator-address',
|
|
14
|
+
description: 'get node operator address by index',
|
|
15
|
+
arguments: {
|
|
16
|
+
_index: {
|
|
17
|
+
name: 'index',
|
|
18
|
+
description: 'index',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
nodeOperatorCount: {
|
|
23
|
+
name: 'node-operator-count',
|
|
24
|
+
description: 'get node operator count',
|
|
25
|
+
},
|
|
26
|
+
pendingRequest: {
|
|
27
|
+
name: 'pending-request',
|
|
28
|
+
description: 'get pending request for a node operator by index',
|
|
29
|
+
arguments: {
|
|
30
|
+
_nodeOperator: {
|
|
31
|
+
name: 'node-operator',
|
|
32
|
+
description: 'node operator address',
|
|
33
|
+
},
|
|
34
|
+
_index: {
|
|
35
|
+
name: 'index',
|
|
36
|
+
description: 'index',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
pendingRequests: {
|
|
41
|
+
name: 'pending-requests',
|
|
42
|
+
description: 'get pending requests for a node operator',
|
|
43
|
+
arguments: {
|
|
44
|
+
_nodeOperator: {
|
|
45
|
+
name: 'node-operator',
|
|
46
|
+
description: 'node operator address',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
pendingRequestsCount: {
|
|
51
|
+
name: 'pending-requests-count',
|
|
52
|
+
description: 'get pending requests count for a node operator',
|
|
53
|
+
arguments: {
|
|
54
|
+
_nodeOperator: {
|
|
55
|
+
name: 'node-operator',
|
|
56
|
+
description: 'node operator address',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
tier: {
|
|
61
|
+
name: 'tier',
|
|
62
|
+
description: 'get tier by ID',
|
|
63
|
+
arguments: {
|
|
64
|
+
_tierId: {
|
|
65
|
+
name: 'id',
|
|
66
|
+
description: 'tier id',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
vaultInfo: {
|
|
71
|
+
name: 'vault-info',
|
|
72
|
+
description: 'get vault limits',
|
|
73
|
+
arguments: {
|
|
74
|
+
vaultAddr: {
|
|
75
|
+
name: 'vault-address',
|
|
76
|
+
description: 'vault address',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../programs/operator-grid/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAA6B;IACzD,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,oCAAoC;QACjD,SAAS,EAAE;YACT,aAAa,EAAE;gBACb,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,uBAAuB;aACrC;SACF;KACF;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,oCAAoC;QACjD,SAAS,EAAE;YACT,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,OAAO;aACrB;SACF;KACF;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,yBAAyB;KACvC;IACD,cAAc,EAAE;QACd,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,kDAAkD;QAC/D,SAAS,EAAE;YACT,aAAa,EAAE;gBACb,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,uBAAuB;aACrC;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,OAAO;aACrB;SACF;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,0CAA0C;QACvD,SAAS,EAAE;YACT,aAAa,EAAE;gBACb,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,uBAAuB;aACrC;SACF;KACF;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,gDAAgD;QAC7D,SAAS,EAAE;YACT,aAAa,EAAE;gBACb,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,uBAAuB;aACrC;SACF;KACF;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,gBAAgB;QAC7B,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,IAAI,EAAE,IAAI;gBACV,WAAW,EAAE,SAAS;aACvB;SACF;KACF;IACD,SAAS,EAAE;QACT,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,kBAAkB;QAC/B,SAAS,EAAE;YACT,SAAS,EAAE;gBACT,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,eAAe;aAC7B;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../programs/operator-grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../programs/operator-grid/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO;KAChC,OAAO,CAAC,eAAe,CAAC;KACxB,WAAW,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Option } from 'commander';
|
|
2
|
+
import { generateReadCommands, getCommandsJson, logInfo } from '../../utils/index.js';
|
|
3
|
+
import { OperatorGridAbi } from '../../abi/index.js';
|
|
4
|
+
import { getOperatorGridContract } from '../../contracts/index.js';
|
|
5
|
+
import { getOperatorGridBaseInfo, getOperatorGridRoles } from '../../features/index.js';
|
|
6
|
+
import { operatorGrid } from './main.js';
|
|
7
|
+
import { readCommandConfig } from './config.js';
|
|
8
|
+
const operatorGridRead = operatorGrid
|
|
9
|
+
.command('read')
|
|
10
|
+
.aliases(['r'])
|
|
11
|
+
.description('operator grid read commands');
|
|
12
|
+
operatorGridRead.addOption(new Option('-cmd2json'));
|
|
13
|
+
operatorGridRead.on('option:-cmd2json', function () {
|
|
14
|
+
logInfo(getCommandsJson(operatorGridRead));
|
|
15
|
+
process.exit();
|
|
16
|
+
});
|
|
17
|
+
operatorGridRead.command('info').action(async () => {
|
|
18
|
+
await getOperatorGridBaseInfo();
|
|
19
|
+
});
|
|
20
|
+
operatorGridRead.command('roles').action(async () => {
|
|
21
|
+
await getOperatorGridRoles();
|
|
22
|
+
});
|
|
23
|
+
generateReadCommands(OperatorGridAbi, getOperatorGridContract, operatorGridRead, readCommandConfig);
|
|
24
|
+
//# sourceMappingURL=read.js.map
|