@lidofinance/lsv-cli 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abi/AccessControlConfirmable.d.ts +3 -2
- package/dist/abi/AccessControlConfirmable.js +3 -1
- package/dist/abi/AccessControlConfirmable.js.map +1 -1
- package/dist/abi/Dashboard.d.ts +64 -27
- package/dist/abi/Dashboard.js +38 -29
- package/dist/abi/Dashboard.js.map +1 -1
- package/dist/abi/LazyOracle.d.ts +44 -3
- package/dist/abi/LazyOracle.js +57 -3
- package/dist/abi/LazyOracle.js.map +1 -1
- package/dist/abi/OperatorGrid.d.ts +28 -0
- package/dist/abi/PredepositGuarantee.d.ts +28 -0
- package/dist/abi/StakingVault.d.ts +56 -0
- package/dist/abi/StakingVault.js +2 -0
- package/dist/abi/StakingVault.js.map +1 -1
- package/dist/abi/VaultFactory.d.ts +32 -4
- package/dist/abi/VaultHub.d.ts +38 -0
- package/dist/abi/VaultHub.js +13 -0
- package/dist/abi/VaultHub.js.map +1 -1
- package/dist/abi/VaultViewer.d.ts +144 -196
- package/dist/abi/VaultViewer.js +188 -257
- package/dist/abi/VaultViewer.js.map +1 -1
- package/dist/abi/defi-wrapper/Distributor.d.ts +448 -0
- package/dist/abi/defi-wrapper/Distributor.js +583 -0
- package/dist/abi/defi-wrapper/Distributor.js.map +1 -0
- package/dist/abi/defi-wrapper/Factory.d.ts +761 -0
- package/dist/abi/defi-wrapper/Factory.js +975 -0
- package/dist/abi/defi-wrapper/Factory.js.map +1 -0
- package/dist/abi/defi-wrapper/StvPool.d.ts +1283 -0
- package/dist/abi/defi-wrapper/StvPool.js +1680 -0
- package/dist/abi/defi-wrapper/StvPool.js.map +1 -0
- package/dist/abi/defi-wrapper/StvStETHPool.d.ts +1755 -0
- package/dist/abi/defi-wrapper/StvStETHPool.js +2301 -0
- package/dist/abi/defi-wrapper/StvStETHPool.js.map +1 -0
- package/dist/abi/defi-wrapper/StvStrategyPool.d.ts +1769 -0
- package/dist/abi/defi-wrapper/StvStrategyPool.js +2319 -0
- package/dist/abi/defi-wrapper/StvStrategyPool.js.map +1 -0
- package/dist/abi/defi-wrapper/WithdrawalQueue.d.ts +1131 -0
- package/dist/abi/defi-wrapper/WithdrawalQueue.js +1472 -0
- package/dist/abi/defi-wrapper/WithdrawalQueue.js.map +1 -0
- package/dist/abi/defi-wrapper/index.d.ts +6 -0
- package/dist/abi/defi-wrapper/index.js +7 -0
- package/dist/abi/defi-wrapper/index.js.map +1 -0
- package/dist/configs/utils.d.ts +1 -0
- package/dist/configs/utils.js +4 -0
- package/dist/configs/utils.js.map +1 -1
- package/dist/contracts/dashboard-impl.d.ts +4 -0
- package/dist/contracts/dashboard-impl.js +16 -0
- package/dist/contracts/dashboard-impl.js.map +1 -0
- package/dist/contracts/defi-wrapper/distributor.d.ts +4 -0
- package/dist/contracts/defi-wrapper/distributor.js +11 -0
- package/dist/contracts/defi-wrapper/distributor.js.map +1 -0
- package/dist/contracts/defi-wrapper/factory.d.ts +4 -0
- package/dist/contracts/defi-wrapper/factory.js +11 -0
- package/dist/contracts/defi-wrapper/factory.js.map +1 -0
- package/dist/contracts/defi-wrapper/index.d.ts +6 -0
- package/dist/contracts/defi-wrapper/index.js +7 -0
- package/dist/contracts/defi-wrapper/index.js.map +1 -0
- package/dist/contracts/defi-wrapper/stv-pool.d.ts +4 -0
- package/dist/contracts/defi-wrapper/stv-pool.js +11 -0
- package/dist/contracts/defi-wrapper/stv-pool.js.map +1 -0
- package/dist/contracts/defi-wrapper/stv-steth-pool.d.ts +4 -0
- package/dist/contracts/defi-wrapper/stv-steth-pool.js +11 -0
- package/dist/contracts/defi-wrapper/stv-steth-pool.js.map +1 -0
- package/dist/contracts/defi-wrapper/stv-strategy-pool.d.ts +4 -0
- package/dist/contracts/defi-wrapper/stv-strategy-pool.js +11 -0
- package/dist/contracts/defi-wrapper/stv-strategy-pool.js.map +1 -0
- package/dist/contracts/defi-wrapper/withdrawal-queue.d.ts +4 -0
- package/dist/contracts/defi-wrapper/withdrawal-queue.js +11 -0
- package/dist/contracts/defi-wrapper/withdrawal-queue.js.map +1 -0
- 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/vault-factory.d.ts +774 -102
- package/dist/contracts/vault-viewer.d.ts +2765 -4893
- package/dist/contracts/vault-viewer.js +1 -1
- package/dist/features/defi-wrapper-factory.d.ts +18 -0
- package/dist/features/defi-wrapper-factory.js +28 -0
- package/dist/features/defi-wrapper-factory.js.map +1 -0
- package/dist/features/deposits/check-bls-deposits.d.ts +2 -1
- package/dist/features/deposits/check-bls-deposits.js +10 -1
- package/dist/features/deposits/check-bls-deposits.js.map +1 -1
- package/dist/features/deposits/make-pdg-proof.d.ts +8 -0
- package/dist/features/deposits/make-pdg-proof.js +17 -1
- package/dist/features/deposits/make-pdg-proof.js.map +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/mint-burn/allowance.js +1 -1
- package/dist/features/mint-burn/allowance.js.map +1 -1
- package/dist/features/pdg.d.ts +7 -0
- package/dist/features/pdg.js +5 -5
- package/dist/features/pdg.js.map +1 -1
- package/dist/features/utils/quarantine.d.ts +2 -0
- package/dist/features/utils/report-fresh.js +17 -0
- package/dist/features/utils/report-fresh.js.map +1 -1
- package/dist/features/vault-factory.d.ts +2 -2
- package/dist/features/vault-factory.js +6 -1
- package/dist/features/vault-factory.js.map +1 -1
- package/dist/features/vault-operations/create-vault.js +2 -2
- package/dist/features/vault-operations/create-vault.js.map +1 -1
- package/dist/features/vault-operations/vault-info.js +1 -1
- package/dist/features/vault-operations/vault-info.js.map +1 -1
- package/dist/features/vault-operations/vault-overview.js +9 -11
- package/dist/features/vault-operations/vault-overview.js.map +1 -1
- package/dist/features/vault-operations/vault-roles.d.ts +2 -1
- package/dist/features/vault-operations/vault-roles.js +22 -23
- package/dist/features/vault-operations/vault-roles.js.map +1 -1
- package/dist/features/vault-operations/vaults-by-role.d.ts +5 -0
- package/dist/features/vault-operations/vaults-by-role.js +103 -35
- package/dist/features/vault-operations/vaults-by-role.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/programs/contracts/dashboard/config.js +4 -0
- package/dist/programs/contracts/dashboard/config.js.map +1 -1
- package/dist/programs/contracts/dashboard/write.js +45 -21
- package/dist/programs/contracts/dashboard/write.js.map +1 -1
- package/dist/programs/contracts/lazy-oracle/config.js +33 -0
- package/dist/programs/contracts/lazy-oracle/config.js.map +1 -1
- package/dist/programs/contracts/operator-grid/write.js +2 -75
- package/dist/programs/contracts/operator-grid/write.js.map +1 -1
- package/dist/programs/contracts/pdg/read.js +2 -5
- package/dist/programs/contracts/pdg/read.js.map +1 -1
- package/dist/programs/contracts/pdg/write.js +39 -7
- package/dist/programs/contracts/pdg/write.js.map +1 -1
- package/dist/programs/contracts/vault/write.js +18 -7
- package/dist/programs/contracts/vault/write.js.map +1 -1
- package/dist/programs/contracts/vault-factory/write.js +25 -15
- package/dist/programs/contracts/vault-factory/write.js.map +1 -1
- package/dist/programs/contracts/vault-viewer/config.js +102 -59
- package/dist/programs/contracts/vault-viewer/config.js.map +1 -1
- package/dist/programs/contracts/vault-viewer/read.js +22 -76
- package/dist/programs/contracts/vault-viewer/read.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/distributor/config.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/distributor/config.js +44 -0
- package/dist/programs/defi-wrapper/contracts/distributor/config.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/distributor/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/distributor/index.js +4 -0
- package/dist/programs/defi-wrapper/contracts/distributor/index.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/distributor/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/distributor/main.js +5 -0
- package/dist/programs/defi-wrapper/contracts/distributor/main.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/distributor/read.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/distributor/read.js +40 -0
- package/dist/programs/defi-wrapper/contracts/distributor/read.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/distributor/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/distributor/write.js +70 -0
- package/dist/programs/defi-wrapper/contracts/distributor/write.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/factory/config.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/factory/config.js +2 -0
- package/dist/programs/defi-wrapper/contracts/factory/config.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/factory/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/factory/index.js +4 -0
- package/dist/programs/defi-wrapper/contracts/factory/index.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/factory/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/factory/main.js +6 -0
- package/dist/programs/defi-wrapper/contracts/factory/main.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/factory/read.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/factory/read.js +56 -0
- package/dist/programs/defi-wrapper/contracts/factory/read.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/factory/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/factory/write.js +327 -0
- package/dist/programs/defi-wrapper/contracts/factory/write.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/index.d.ts +7 -0
- package/dist/programs/defi-wrapper/contracts/index.js +8 -0
- package/dist/programs/defi-wrapper/contracts/index.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/main.js +6 -0
- package/dist/programs/defi-wrapper/contracts/main.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/config.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/config.js +83 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/config.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/index.js +4 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/index.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/main.js +6 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/main.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/read.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/read.js +77 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/read.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/write.js +287 -0
- package/dist/programs/defi-wrapper/contracts/stv-pool/write.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.js +210 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.js +4 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.js +6 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.js +77 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js +370 -0
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.js +214 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/index.js +4 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/index.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.js +6 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/read.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/read.js +77 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/read.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/write.js +370 -0
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/write.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.js +156 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.js +4 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.js +6 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.js +84 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.js.map +1 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js +140 -0
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js.map +1 -0
- package/dist/programs/defi-wrapper/index.d.ts +2 -0
- package/dist/programs/defi-wrapper/index.js +3 -0
- package/dist/programs/defi-wrapper/index.js.map +1 -0
- package/dist/programs/defi-wrapper/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/main.js +6 -0
- package/dist/programs/defi-wrapper/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 +3 -3
- package/dist/programs/pdg-helpers.js.map +1 -1
- package/dist/programs/use-cases/deposits/read.js +4 -4
- package/dist/programs/use-cases/deposits/read.js.map +1 -1
- package/dist/programs/use-cases/deposits/write.js +103 -8
- package/dist/programs/use-cases/deposits/write.js.map +1 -1
- package/dist/programs/use-cases/metrics/read.js +29 -13
- package/dist/programs/use-cases/metrics/read.js.map +1 -1
- package/dist/programs/use-cases/report/write.js +3 -0
- package/dist/programs/use-cases/report/write.js.map +1 -1
- package/dist/programs/use-cases/vault-operations/create-vault.js +11 -5
- package/dist/programs/use-cases/vault-operations/create-vault.js.map +1 -1
- package/dist/providers/wallet.d.ts +2 -7663
- package/dist/providers/wallet.js +1 -1
- package/dist/providers/wallet.js.map +1 -1
- package/dist/utils/arguments.d.ts +4 -0
- package/dist/utils/arguments.js +16 -3
- package/dist/utils/arguments.js.map +1 -1
- package/dist/utils/fetchCL.d.ts +1 -5
- package/dist/utils/fetchCL.js +5 -7
- package/dist/utils/fetchCL.js.map +1 -1
- package/dist/utils/health/health-utils.js +1 -1
- package/dist/utils/health/health-utils.js.map +1 -1
- package/dist/utils/proof/constants.d.ts +6 -0
- package/dist/utils/proof/constants.js +7 -0
- package/dist/utils/proof/constants.js.map +1 -0
- package/dist/utils/proof/first-validator-gindex.js +0 -4
- package/dist/utils/proof/first-validator-gindex.js.map +1 -1
- package/dist/utils/proof/proofs.d.ts +7 -8
- package/dist/utils/proof/proofs.js +36 -28
- package/dist/utils/proof/proofs.js.map +1 -1
- package/dist/utils/transactions/tx-private-key.d.ts +2 -2
- package/dist/utils/transactions/tx-private-key.js.map +1 -1
- package/dist/utils/transactions/tx-wc.d.ts +29 -1
- package/dist/utils/transactions/tx-wc.js +41 -24
- package/dist/utils/transactions/tx-wc.js.map +1 -1
- package/dist/utils/wallet-connect.d.ts +4 -7664
- package/dist/utils/wallet-connect.js +14 -2
- package/dist/utils/wallet-connect.js.map +1 -1
- package/dist/version/index.js +1 -1
- package/package.json +4 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const factory: import("commander").Command;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/factory/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB;KACxC,OAAO,CAAC,SAAS,CAAC;KAClB,KAAK,CAAC,GAAG,CAAC;KACV,WAAW,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Option } from 'commander';
|
|
2
|
+
import { FactoryAbi } from '../../../../abi/defi-wrapper/index.js';
|
|
3
|
+
import { getFactoryContract } from '../../../../contracts/defi-wrapper/index.js';
|
|
4
|
+
import { generateReadCommands, logInfo, getCommandsJson, stringToAddress, callReadMethodSilent, logResult, } from '../../../../utils/index.js';
|
|
5
|
+
import { factory } from './main.js';
|
|
6
|
+
import { readCommandConfig } from './config.js';
|
|
7
|
+
const factoryRead = factory
|
|
8
|
+
.command('read')
|
|
9
|
+
.alias('r')
|
|
10
|
+
.description('read commands');
|
|
11
|
+
factoryRead.addOption(new Option('-cmd2json'));
|
|
12
|
+
factoryRead.on('option:-cmd2json', function () {
|
|
13
|
+
logInfo(getCommandsJson(factoryRead));
|
|
14
|
+
process.exit();
|
|
15
|
+
});
|
|
16
|
+
factoryRead
|
|
17
|
+
.command('info')
|
|
18
|
+
.description('get factory base info')
|
|
19
|
+
.argument('<address>', 'factory address', stringToAddress)
|
|
20
|
+
.action(async (address) => {
|
|
21
|
+
const contract = getFactoryContract(address);
|
|
22
|
+
const [dummyImplementation, ggvStrategyFactory, loopStrategyFactory, stvPoolFactory, stvStethPoolFactory, stvStrategyPoolFactory, timelockFactory, vaultFactory, withdrawalQueueFactory, lazyOracle, steth, wsteth, timelockMinDelay,] = await Promise.all([
|
|
23
|
+
callReadMethodSilent(contract, 'DUMMY_IMPLEMENTATION'),
|
|
24
|
+
callReadMethodSilent(contract, 'GGV_STRATEGY_FACTORY'),
|
|
25
|
+
callReadMethodSilent(contract, 'LOOP_STRATEGY_FACTORY'),
|
|
26
|
+
callReadMethodSilent(contract, 'STV_POOL_FACTORY'),
|
|
27
|
+
callReadMethodSilent(contract, 'STV_STETH_POOL_FACTORY'),
|
|
28
|
+
callReadMethodSilent(contract, 'STV_STRATEGY_POOL_FACTORY'),
|
|
29
|
+
callReadMethodSilent(contract, 'TIMELOCK_FACTORY'),
|
|
30
|
+
callReadMethodSilent(contract, 'VAULT_FACTORY'),
|
|
31
|
+
callReadMethodSilent(contract, 'WITHDRAWAL_QUEUE_FACTORY'),
|
|
32
|
+
callReadMethodSilent(contract, 'LAZY_ORACLE'),
|
|
33
|
+
callReadMethodSilent(contract, 'STETH'),
|
|
34
|
+
callReadMethodSilent(contract, 'WSTETH'),
|
|
35
|
+
callReadMethodSilent(contract, 'TIMELOCK_MIN_DELAY'),
|
|
36
|
+
]);
|
|
37
|
+
logResult({
|
|
38
|
+
data: [
|
|
39
|
+
['dummyImplementation', dummyImplementation],
|
|
40
|
+
['ggvStrategyFactory', ggvStrategyFactory],
|
|
41
|
+
['loopStrategyFactory', loopStrategyFactory],
|
|
42
|
+
['stvPoolFactory', stvPoolFactory],
|
|
43
|
+
['stvStethPoolFactory', stvStethPoolFactory],
|
|
44
|
+
['stvStrategyPoolFactory', stvStrategyPoolFactory],
|
|
45
|
+
['timelockFactory', timelockFactory],
|
|
46
|
+
['vaultFactory', vaultFactory],
|
|
47
|
+
['withdrawalQueueFactory', withdrawalQueueFactory],
|
|
48
|
+
['lazyOracle', lazyOracle],
|
|
49
|
+
['steth', steth],
|
|
50
|
+
['wsteth', wsteth],
|
|
51
|
+
['timelockMinDelay', timelockMinDelay],
|
|
52
|
+
],
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
generateReadCommands(FactoryAbi, getFactoryContract, factoryRead, readCommandConfig);
|
|
56
|
+
//# sourceMappingURL=read.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/factory/read.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,eAAe,EACf,eAAe,EACf,oBAAoB,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B,CAAC;QAC3D,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,CAAC;QAClD,oBAAoB,CAAC,QAAQ,EAAE,eAAe,CAAC;QAC/C,oBAAoB,CAAC,QAAQ,EAAE,0BAA0B,CAAC;QAE1D,oBAAoB,CAAC,QAAQ,EAAE,aAAa,CAAC;QAC7C,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC;QACvC,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAExC,oBAAoB,CAAC,QAAQ,EAAE,oBAAoB,CAAC;KACrD,CAAC,CAAC;IAEH,SAAS,CAAC;QACR,IAAI,EAAE;YACJ,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;YAC5C,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;YAC1C,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;YAC5C,CAAC,gBAAgB,EAAE,cAAc,CAAC;YAClC,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;YAC5C,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;YAClD,CAAC,iBAAiB,EAAE,eAAe,CAAC;YACpC,CAAC,cAAc,EAAE,YAAY,CAAC;YAC9B,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;YAClD,CAAC,YAAY,EAAE,UAAU,CAAC;YAC1B,CAAC,OAAO,EAAE,KAAK,CAAC;YAChB,CAAC,QAAQ,EAAE,MAAM,CAAC;YAClB,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;SACvC;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,oBAAoB,CAClB,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,iBAAiB,CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { Option } from 'commander';
|
|
2
|
+
import { logInfo, logResult, getCommandsJson, stringToAddress, callWriteMethodWithReceipt, confirmOperation, stringToBigInt, stringToNumber, } from '../../../../utils/index.js';
|
|
3
|
+
import { getFactoryContract } from '../../../../contracts/defi-wrapper/index.js';
|
|
4
|
+
import { getCreateVaultEventData } from '../../../../features/index.js';
|
|
5
|
+
import { factory } from './main.js';
|
|
6
|
+
const factoryWrite = factory
|
|
7
|
+
.command('write')
|
|
8
|
+
.alias('w')
|
|
9
|
+
.description('write commands');
|
|
10
|
+
factoryWrite.addOption(new Option('-cmd2json'));
|
|
11
|
+
factoryWrite.on('option:-cmd2json', function () {
|
|
12
|
+
logInfo(getCommandsJson(factoryWrite));
|
|
13
|
+
process.exit();
|
|
14
|
+
});
|
|
15
|
+
factoryWrite
|
|
16
|
+
.command('create-vault-with-configured-wrapper')
|
|
17
|
+
.description('create a new vault with a configured wrapper')
|
|
18
|
+
.argument('<address>', 'factory address', stringToAddress)
|
|
19
|
+
.argument('<nodeOperator>', 'node operator address', stringToAddress)
|
|
20
|
+
.argument('<nodeOperatorManager>', 'node operator manager address', stringToAddress)
|
|
21
|
+
.argument('<nodeOperatorFeeBP>', 'node operator fee basis points', stringToBigInt)
|
|
22
|
+
.argument('<confirmExpiry>', 'confirm expiry', stringToBigInt)
|
|
23
|
+
.argument('<maxFinalizationTime>', 'max finalization time', stringToBigInt)
|
|
24
|
+
.argument('<minWithdrawalDelayTime>', 'min withdrawal delay time', stringToBigInt)
|
|
25
|
+
.argument('<configuration>', 'configuration', stringToNumber)
|
|
26
|
+
.argument('<strategy>', 'strategy address', stringToAddress)
|
|
27
|
+
.argument('<allowlistEnabled>', 'allowlist enabled', Boolean)
|
|
28
|
+
.argument('<reserveRatioGapBP>', 'reserve ratio gap basis points', stringToBigInt)
|
|
29
|
+
.argument('<timelockExecutor>', 'timelock executor address', stringToAddress)
|
|
30
|
+
.action(async (address, nodeOperator, nodeOperatorManager, nodeOperatorFeeBP, confirmExpiry, maxFinalizationTime, minWithdrawalDelayTime, configuration, strategy, allowlistEnabled, reserveRatioGapBP, timelockExecutor) => {
|
|
31
|
+
const contract = getFactoryContract(address);
|
|
32
|
+
const confirmationMessage = `Are you sure you want to create a new vault with a configured wrapper?\n
|
|
33
|
+
nodeOperator: ${nodeOperator}
|
|
34
|
+
nodeOperatorManager: ${nodeOperatorManager}
|
|
35
|
+
nodeOperatorFeeBP: ${nodeOperatorFeeBP}
|
|
36
|
+
confirmExpiry: ${confirmExpiry}
|
|
37
|
+
maxFinalizationTime: ${maxFinalizationTime}
|
|
38
|
+
minWithdrawalDelayTime: ${minWithdrawalDelayTime}
|
|
39
|
+
configuration: ${configuration}
|
|
40
|
+
strategy: ${strategy}
|
|
41
|
+
allowlistEnabled: ${allowlistEnabled}
|
|
42
|
+
reserveRatioGapBP: ${reserveRatioGapBP}
|
|
43
|
+
timelockExecutor: ${timelockExecutor}\n`;
|
|
44
|
+
const confirm = await confirmOperation(confirmationMessage);
|
|
45
|
+
if (!confirm)
|
|
46
|
+
return;
|
|
47
|
+
const result = await callWriteMethodWithReceipt({
|
|
48
|
+
contract,
|
|
49
|
+
methodName: 'createVaultWithConfiguredWrapper',
|
|
50
|
+
payload: [
|
|
51
|
+
nodeOperator,
|
|
52
|
+
nodeOperatorManager,
|
|
53
|
+
nodeOperatorFeeBP,
|
|
54
|
+
confirmExpiry,
|
|
55
|
+
maxFinalizationTime,
|
|
56
|
+
minWithdrawalDelayTime,
|
|
57
|
+
configuration,
|
|
58
|
+
strategy,
|
|
59
|
+
allowlistEnabled,
|
|
60
|
+
reserveRatioGapBP,
|
|
61
|
+
timelockExecutor,
|
|
62
|
+
],
|
|
63
|
+
});
|
|
64
|
+
if (!result.receipt || !result.tx) {
|
|
65
|
+
logInfo('Transaction has been sent');
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const eventData = await getCreateVaultEventData(result.receipt, result.tx);
|
|
69
|
+
logResult({
|
|
70
|
+
data: [
|
|
71
|
+
['Vault Address', eventData.vault],
|
|
72
|
+
['Pool Address', eventData.pool],
|
|
73
|
+
['Withdrawal Queue Address', eventData.withdrawalQueue],
|
|
74
|
+
['Strategy Address', eventData.strategy],
|
|
75
|
+
['Configuration', eventData.configuration],
|
|
76
|
+
['Transaction Hash', result.tx],
|
|
77
|
+
['Block Number', eventData.blockNumber],
|
|
78
|
+
],
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
factoryWrite
|
|
82
|
+
.command('create-vault-with-no-minting-no-strategy')
|
|
83
|
+
.description('create a new vault with no minting no strategy')
|
|
84
|
+
.argument('<address>', 'factory address', stringToAddress)
|
|
85
|
+
.argument('<nodeOperator>', 'node operator address', stringToAddress)
|
|
86
|
+
.argument('<nodeOperatorManager>', 'node operator manager address', stringToAddress)
|
|
87
|
+
.argument('<nodeOperatorFeeBP>', 'node operator fee basis points', stringToBigInt)
|
|
88
|
+
.argument('<confirmExpiry>', 'confirm expiry', stringToBigInt)
|
|
89
|
+
.argument('<maxFinalizationTime>', 'max finalization time', stringToBigInt)
|
|
90
|
+
.argument('<minWithdrawalDelayTime>', 'min withdrawal delay time', stringToBigInt)
|
|
91
|
+
.argument('<allowlistEnabled>', 'allowlist enabled', Boolean)
|
|
92
|
+
.option('-te, --timelockExecutor', 'timelockExecutor', stringToAddress)
|
|
93
|
+
.action(async (address, nodeOperator, nodeOperatorManager, nodeOperatorFeeBP, confirmExpiry, maxFinalizationTime, minWithdrawalDelayTime, allowlistEnabled, { timelockExecutor }) => {
|
|
94
|
+
const contract = getFactoryContract(address);
|
|
95
|
+
const confirmationMessage = `Are you sure you want to create a new vault with no minting no strategy?\n
|
|
96
|
+
nodeOperator: ${nodeOperator}
|
|
97
|
+
nodeOperatorManager: ${nodeOperatorManager}
|
|
98
|
+
nodeOperatorFeeBP: ${nodeOperatorFeeBP}
|
|
99
|
+
confirmExpiry: ${confirmExpiry}
|
|
100
|
+
maxFinalizationTime: ${maxFinalizationTime}
|
|
101
|
+
minWithdrawalDelayTime: ${minWithdrawalDelayTime}
|
|
102
|
+
allowlistEnabled: ${allowlistEnabled}
|
|
103
|
+
timelockExecutor: ${timelockExecutor ?? 'undefined'}\n`;
|
|
104
|
+
const confirm = await confirmOperation(confirmationMessage);
|
|
105
|
+
if (!confirm)
|
|
106
|
+
return;
|
|
107
|
+
const result = await callWriteMethodWithReceipt({
|
|
108
|
+
contract,
|
|
109
|
+
methodName: 'createVaultWithNoMintingNoStrategy',
|
|
110
|
+
payload: [
|
|
111
|
+
nodeOperator,
|
|
112
|
+
nodeOperatorManager,
|
|
113
|
+
nodeOperatorFeeBP,
|
|
114
|
+
confirmExpiry,
|
|
115
|
+
maxFinalizationTime,
|
|
116
|
+
minWithdrawalDelayTime,
|
|
117
|
+
allowlistEnabled,
|
|
118
|
+
timelockExecutor ?? undefined,
|
|
119
|
+
],
|
|
120
|
+
});
|
|
121
|
+
if (!result.receipt || !result.tx) {
|
|
122
|
+
logInfo('Transaction has been sent');
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const eventData = await getCreateVaultEventData(result.receipt, result.tx);
|
|
126
|
+
logResult({
|
|
127
|
+
data: [
|
|
128
|
+
['Vault Address', eventData.vault],
|
|
129
|
+
['Pool Address', eventData.pool],
|
|
130
|
+
['Withdrawal Queue Address', eventData.withdrawalQueue],
|
|
131
|
+
['Strategy Address', eventData.strategy],
|
|
132
|
+
['Configuration', eventData.configuration],
|
|
133
|
+
['Transaction Hash', result.tx],
|
|
134
|
+
['Block Number', eventData.blockNumber],
|
|
135
|
+
],
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
factoryWrite
|
|
139
|
+
.command('create-vault-with-minting-no-strategy')
|
|
140
|
+
.description('create a new vault with minting no strategy')
|
|
141
|
+
.argument('<address>', 'factory address', stringToAddress)
|
|
142
|
+
.argument('<nodeOperator>', 'node operator address', stringToAddress)
|
|
143
|
+
.argument('<nodeOperatorManager>', 'node operator manager address', stringToAddress)
|
|
144
|
+
.argument('<nodeOperatorFeeBP>', 'node operator fee basis points', stringToBigInt)
|
|
145
|
+
.argument('<confirmExpiry>', 'confirm expiry', stringToBigInt)
|
|
146
|
+
.argument('<maxFinalizationTime>', 'max finalization time', stringToBigInt)
|
|
147
|
+
.argument('<minWithdrawalDelayTime>', 'min withdrawal delay time', stringToBigInt)
|
|
148
|
+
.argument('<allowlistEnabled>', 'allowlist enabled', Boolean)
|
|
149
|
+
.argument('<reserveRatioGapBP>', 'reserve ratio gap basis points', stringToBigInt)
|
|
150
|
+
.option('-te, --timelockExecutor', 'timelockExecutor', stringToAddress)
|
|
151
|
+
.action(async (address, nodeOperator, nodeOperatorManager, nodeOperatorFeeBP, confirmExpiry, maxFinalizationTime, minWithdrawalDelayTime, allowlistEnabled, reserveRatioGapBP, { timelockExecutor }) => {
|
|
152
|
+
const contract = getFactoryContract(address);
|
|
153
|
+
const confirmationMessage = `Are you sure you want to create a new vault with minting no strategy?\n
|
|
154
|
+
nodeOperator: ${nodeOperator}
|
|
155
|
+
nodeOperatorManager: ${nodeOperatorManager}
|
|
156
|
+
nodeOperatorFeeBP: ${nodeOperatorFeeBP}
|
|
157
|
+
confirmExpiry: ${confirmExpiry}
|
|
158
|
+
maxFinalizationTime: ${maxFinalizationTime}
|
|
159
|
+
minWithdrawalDelayTime: ${minWithdrawalDelayTime}
|
|
160
|
+
allowlistEnabled: ${allowlistEnabled}
|
|
161
|
+
reserveRatioGapBP: ${reserveRatioGapBP}
|
|
162
|
+
timelockExecutor: ${timelockExecutor ?? 'undefined'}\n`;
|
|
163
|
+
const confirm = await confirmOperation(confirmationMessage);
|
|
164
|
+
if (!confirm)
|
|
165
|
+
return;
|
|
166
|
+
const result = await callWriteMethodWithReceipt({
|
|
167
|
+
contract,
|
|
168
|
+
methodName: 'createVaultWithMintingNoStrategy',
|
|
169
|
+
payload: [
|
|
170
|
+
nodeOperator,
|
|
171
|
+
nodeOperatorManager,
|
|
172
|
+
nodeOperatorFeeBP,
|
|
173
|
+
confirmExpiry,
|
|
174
|
+
maxFinalizationTime,
|
|
175
|
+
minWithdrawalDelayTime,
|
|
176
|
+
allowlistEnabled,
|
|
177
|
+
reserveRatioGapBP,
|
|
178
|
+
timelockExecutor ?? undefined,
|
|
179
|
+
],
|
|
180
|
+
});
|
|
181
|
+
if (!result.receipt || !result.tx) {
|
|
182
|
+
logInfo('Transaction has been sent');
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const eventData = await getCreateVaultEventData(result.receipt, result.tx);
|
|
186
|
+
logResult({
|
|
187
|
+
data: [
|
|
188
|
+
['Vault Address', eventData.vault],
|
|
189
|
+
['Pool Address', eventData.pool],
|
|
190
|
+
['Withdrawal Queue Address', eventData.withdrawalQueue],
|
|
191
|
+
['Strategy Address', eventData.strategy],
|
|
192
|
+
['Configuration', eventData.configuration],
|
|
193
|
+
['Transaction Hash', result.tx],
|
|
194
|
+
['Block Number', eventData.blockNumber],
|
|
195
|
+
],
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
factoryWrite
|
|
199
|
+
.command('create-vault-with-loop-strategy')
|
|
200
|
+
.description('create a new vault with loop strategy')
|
|
201
|
+
.argument('<address>', 'factory address', stringToAddress)
|
|
202
|
+
.argument('<nodeOperator>', 'node operator address', stringToAddress)
|
|
203
|
+
.argument('<nodeOperatorManager>', 'node operator manager address', stringToAddress)
|
|
204
|
+
.argument('<nodeOperatorFeeBP>', 'node operator fee basis points', stringToBigInt)
|
|
205
|
+
.argument('<confirmExpiry>', 'confirm expiry', stringToBigInt)
|
|
206
|
+
.argument('<maxFinalizationTime>', 'max finalization time', stringToBigInt)
|
|
207
|
+
.argument('<minWithdrawalDelayTime>', 'min withdrawal delay time', stringToBigInt)
|
|
208
|
+
.argument('<allowlistEnabled>', 'allowlist enabled', Boolean)
|
|
209
|
+
.argument('<reserveRatioGapBP>', 'reserve ratio gap basis points', stringToBigInt)
|
|
210
|
+
.argument('<loops>', 'loops', stringToBigInt)
|
|
211
|
+
.option('-te, --timelockExecutor', 'timelockExecutor', stringToAddress)
|
|
212
|
+
.action(async (address, nodeOperator, nodeOperatorManager, nodeOperatorFeeBP, confirmExpiry, maxFinalizationTime, minWithdrawalDelayTime, allowlistEnabled, reserveRatioGapBP, loops, { timelockExecutor }) => {
|
|
213
|
+
const contract = getFactoryContract(address);
|
|
214
|
+
const confirmationMessage = `Are you sure you want to create a new vault with loop strategy?\n
|
|
215
|
+
nodeOperator: ${nodeOperator}
|
|
216
|
+
nodeOperatorManager: ${nodeOperatorManager}
|
|
217
|
+
nodeOperatorFeeBP: ${nodeOperatorFeeBP}
|
|
218
|
+
confirmExpiry: ${confirmExpiry}
|
|
219
|
+
maxFinalizationTime: ${maxFinalizationTime}
|
|
220
|
+
minWithdrawalDelayTime: ${minWithdrawalDelayTime}
|
|
221
|
+
allowlistEnabled: ${allowlistEnabled}
|
|
222
|
+
reserveRatioGapBP: ${reserveRatioGapBP}
|
|
223
|
+
loops: ${loops}
|
|
224
|
+
timelockExecutor: ${timelockExecutor ?? 'undefined'}\n`;
|
|
225
|
+
const confirm = await confirmOperation(confirmationMessage);
|
|
226
|
+
if (!confirm)
|
|
227
|
+
return;
|
|
228
|
+
const result = await callWriteMethodWithReceipt({
|
|
229
|
+
contract,
|
|
230
|
+
methodName: 'createVaultWithLoopStrategy',
|
|
231
|
+
payload: [
|
|
232
|
+
nodeOperator,
|
|
233
|
+
nodeOperatorManager,
|
|
234
|
+
nodeOperatorFeeBP,
|
|
235
|
+
confirmExpiry,
|
|
236
|
+
maxFinalizationTime,
|
|
237
|
+
minWithdrawalDelayTime,
|
|
238
|
+
allowlistEnabled,
|
|
239
|
+
reserveRatioGapBP,
|
|
240
|
+
loops,
|
|
241
|
+
timelockExecutor ?? undefined,
|
|
242
|
+
],
|
|
243
|
+
});
|
|
244
|
+
if (!result.receipt || !result.tx) {
|
|
245
|
+
logInfo('Transaction has been sent');
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
const eventData = await getCreateVaultEventData(result.receipt, result.tx);
|
|
249
|
+
logResult({
|
|
250
|
+
data: [
|
|
251
|
+
['Vault Address', eventData.vault],
|
|
252
|
+
['Pool Address', eventData.pool],
|
|
253
|
+
['Withdrawal Queue Address', eventData.withdrawalQueue],
|
|
254
|
+
['Strategy Address', eventData.strategy],
|
|
255
|
+
['Configuration', eventData.configuration],
|
|
256
|
+
['Transaction Hash', result.tx],
|
|
257
|
+
['Block Number', eventData.blockNumber],
|
|
258
|
+
],
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
factoryWrite
|
|
262
|
+
.command('create-vault-with-ggv-strategy')
|
|
263
|
+
.description('create a new vault with ggv strategy')
|
|
264
|
+
.argument('<address>', 'factory address', stringToAddress)
|
|
265
|
+
.argument('<nodeOperator>', 'node operator address', stringToAddress)
|
|
266
|
+
.argument('<nodeOperatorManager>', 'node operator manager address', stringToAddress)
|
|
267
|
+
.argument('<nodeOperatorFeeBP>', 'node operator fee basis points', stringToBigInt)
|
|
268
|
+
.argument('<confirmExpiry>', 'confirm expiry', stringToBigInt)
|
|
269
|
+
.argument('<maxFinalizationTime>', 'max finalization time', stringToBigInt)
|
|
270
|
+
.argument('<minWithdrawalDelayTime>', 'min withdrawal delay time', stringToBigInt)
|
|
271
|
+
.argument('<allowlistEnabled>', 'allowlist enabled', Boolean)
|
|
272
|
+
.argument('<reserveRatioGapBP>', 'reserve ratio gap basis points', stringToBigInt)
|
|
273
|
+
.argument('<teller>', 'teller address', stringToAddress)
|
|
274
|
+
.argument('<boringQueue>', 'boring queue address', stringToAddress)
|
|
275
|
+
.option('-te, --timelockExecutor', 'timelockExecutor', stringToAddress)
|
|
276
|
+
.action(async (address, nodeOperator, nodeOperatorManager, nodeOperatorFeeBP, confirmExpiry, maxFinalizationTime, minWithdrawalDelayTime, allowlistEnabled, reserveRatioGapBP, teller, boringQueue, { timelockExecutor }) => {
|
|
277
|
+
const contract = getFactoryContract(address);
|
|
278
|
+
const confirmationMessage = `Are you sure you want to create a new vault with ggv strategy?\n
|
|
279
|
+
nodeOperator: ${nodeOperator}
|
|
280
|
+
nodeOperatorManager: ${nodeOperatorManager}
|
|
281
|
+
nodeOperatorFeeBP: ${nodeOperatorFeeBP}
|
|
282
|
+
confirmExpiry: ${confirmExpiry}
|
|
283
|
+
maxFinalizationTime: ${maxFinalizationTime}
|
|
284
|
+
minWithdrawalDelayTime: ${minWithdrawalDelayTime}
|
|
285
|
+
allowlistEnabled: ${allowlistEnabled}
|
|
286
|
+
reserveRatioGapBP: ${reserveRatioGapBP}
|
|
287
|
+
teller: ${teller}
|
|
288
|
+
boringQueue: ${boringQueue}
|
|
289
|
+
timelockExecutor: ${timelockExecutor ?? 'undefined'}\n`;
|
|
290
|
+
const confirm = await confirmOperation(confirmationMessage);
|
|
291
|
+
if (!confirm)
|
|
292
|
+
return;
|
|
293
|
+
const result = await callWriteMethodWithReceipt({
|
|
294
|
+
contract,
|
|
295
|
+
methodName: 'createVaultWithGGVStrategy',
|
|
296
|
+
payload: [
|
|
297
|
+
nodeOperator,
|
|
298
|
+
nodeOperatorManager,
|
|
299
|
+
nodeOperatorFeeBP,
|
|
300
|
+
confirmExpiry,
|
|
301
|
+
maxFinalizationTime,
|
|
302
|
+
minWithdrawalDelayTime,
|
|
303
|
+
allowlistEnabled,
|
|
304
|
+
reserveRatioGapBP,
|
|
305
|
+
teller,
|
|
306
|
+
boringQueue,
|
|
307
|
+
timelockExecutor ?? undefined,
|
|
308
|
+
],
|
|
309
|
+
});
|
|
310
|
+
if (!result.receipt || !result.tx) {
|
|
311
|
+
logInfo('Transaction has been sent');
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const eventData = await getCreateVaultEventData(result.receipt, result.tx);
|
|
315
|
+
logResult({
|
|
316
|
+
data: [
|
|
317
|
+
['Vault Address', eventData.vault],
|
|
318
|
+
['Pool Address', eventData.pool],
|
|
319
|
+
['Withdrawal Queue Address', eventData.withdrawalQueue],
|
|
320
|
+
['Strategy Address', eventData.strategy],
|
|
321
|
+
['Configuration', eventData.configuration],
|
|
322
|
+
['Transaction Hash', result.tx],
|
|
323
|
+
['Block Number', eventData.blockNumber],
|
|
324
|
+
],
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
//# sourceMappingURL=write.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/factory/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,cAAc,EACd,cAAc,GACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,YAAY,GAAG,OAAO;KACzB,OAAO,CAAC,OAAO,CAAC;KAChB,KAAK,CAAC,GAAG,CAAC;KACV,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAEjC,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,YAAY;KACT,OAAO,CAAC,sCAAsC,CAAC;KAC/C,WAAW,CAAC,8CAA8C,CAAC;KAC3D,QAAQ,CAAC,WAAW,EAAE,iBAAiB,EAAE,eAAe,CAAC;KACzD,QAAQ,CAAC,gBAAgB,EAAE,uBAAuB,EAAE,eAAe,CAAC;KACpE,QAAQ,CACP,uBAAuB,EACvB,+BAA+B,EAC/B,eAAe,CAChB;KACA,QAAQ,CACP,qBAAqB,EACrB,gCAAgC,EAChC,cAAc,CACf;KACA,QAAQ,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,CAAC;KAC7D,QAAQ,C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AiB;YACjB,MAAM;YACN,WAAW;YACX,gBAAgB,IAAI,SAAS;SAC9B;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QAClC,OAAO,CAAC,2BAA2B,CAAC,CAAC;QACrC,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,uBAAuB,CAC7C,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,EAAE,CACV,CAAC;IAEF,SAAS,CAAC;QACR,IAAI,EAAE;YACJ,CAAC,eAAe,EAAE,SAAS,CAAC,KAAK,CAAC;YAClC,CAAC,cAAc,EAAE,SAAS,CAAC,IAAI,CAAC;YAChC,CAAC,0BAA0B,EAAE,SAAS,CAAC,eAAe,CAAC;YACvD,CAAC,kBAAkB,EAAE,SAAS,CAAC,QAAQ,CAAC;YACxC,CAAC,eAAe,EAAE,SAAS,CAAC,aAAa,CAAC;YAC1C,CAAC,kBAAkB,EAAE,MAAM,CAAC,EAAE,CAAC;YAC/B,CAAC,cAAc,EAAE,SAAS,CAAC,WAAW,CAAC;SACxC;KACF,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './main.js';
|
|
2
|
+
export * from './distributor/index.js';
|
|
3
|
+
export * from './withdrawal-queue/index.js';
|
|
4
|
+
export * from './stv-pool/index.js';
|
|
5
|
+
export * from './stv-steth-pool/index.js';
|
|
6
|
+
export * from './stv-strategy-pool/index.js';
|
|
7
|
+
export * from './factory/index.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './main.js';
|
|
2
|
+
export * from './distributor/index.js';
|
|
3
|
+
export * from './withdrawal-queue/index.js';
|
|
4
|
+
export * from './stv-pool/index.js';
|
|
5
|
+
export * from './stv-steth-pool/index.js';
|
|
6
|
+
export * from './stv-strategy-pool/index.js';
|
|
7
|
+
export * from './factory/index.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../programs/defi-wrapper/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defiWrapperContracts: import("commander").Command;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../programs/defi-wrapper/contracts/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW;KAC5C,OAAO,CAAC,WAAW,CAAC;KACpB,KAAK,CAAC,GAAG,CAAC;KACV,WAAW,CAAC,iCAAiC,CAAC,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { stringToAddress, stringToBigInt, } from '../../../../utils/index.js';
|
|
2
|
+
export const readCommandConfig = {
|
|
3
|
+
withdrawableStvOf: {
|
|
4
|
+
name: 'withdrawable-stv-of',
|
|
5
|
+
description: 'get calculated amount of stv that can be withdrawn by an account',
|
|
6
|
+
arguments: {
|
|
7
|
+
_account: {
|
|
8
|
+
name: 'account',
|
|
9
|
+
description: 'the address of the account',
|
|
10
|
+
modifier: stringToAddress,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
withdrawableEthOf: {
|
|
15
|
+
name: 'withdrawable-eth-of',
|
|
16
|
+
description: 'get calculated the amount of ETH that can be withdrawn by an account',
|
|
17
|
+
arguments: {
|
|
18
|
+
_account: {
|
|
19
|
+
name: 'account',
|
|
20
|
+
description: 'the address of the account',
|
|
21
|
+
modifier: stringToAddress,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
vaultDisconnected: {
|
|
26
|
+
name: 'vault-disconnected',
|
|
27
|
+
description: 'get whether the vault is disconnected',
|
|
28
|
+
},
|
|
29
|
+
totalUnassignedLiabilityShares: {
|
|
30
|
+
name: 'total-unassigned-liability-shares',
|
|
31
|
+
aliases: ['tuls'],
|
|
32
|
+
description: 'get the total liability stETH shares that are not assigned to any users',
|
|
33
|
+
},
|
|
34
|
+
totalAssets: {
|
|
35
|
+
name: 'total-assets',
|
|
36
|
+
aliases: ['ta'],
|
|
37
|
+
description: 'get the total assets managed by the pool',
|
|
38
|
+
},
|
|
39
|
+
totalLiabilityShares: {
|
|
40
|
+
name: 'total-liability-shares',
|
|
41
|
+
aliases: ['tls'],
|
|
42
|
+
description: 'get the total liability stETH shares issued to the vault',
|
|
43
|
+
},
|
|
44
|
+
totalExceedingMintedSteth: {
|
|
45
|
+
name: 'total-exceeding-minted-steth',
|
|
46
|
+
aliases: ['tems'],
|
|
47
|
+
description: "get the amount of minted stETH exceeding the Staking Vault's liability",
|
|
48
|
+
},
|
|
49
|
+
previewWithdraw: {
|
|
50
|
+
name: 'preview-withdraw',
|
|
51
|
+
description: 'get preview the amount of stv that would be burned for a given asset withdrawal',
|
|
52
|
+
arguments: {
|
|
53
|
+
_assets: {
|
|
54
|
+
name: 'assets',
|
|
55
|
+
description: 'the amount of assets to withdraw (18 decimals)',
|
|
56
|
+
modifier: stringToBigInt,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
previewRedeem: {
|
|
61
|
+
name: 'preview-redeem',
|
|
62
|
+
description: 'get preview the amount of assets that would be received for a given stv amount',
|
|
63
|
+
arguments: {
|
|
64
|
+
_stv: {
|
|
65
|
+
name: 'stv',
|
|
66
|
+
description: 'the amount of stv to redeem (27 decimals)',
|
|
67
|
+
modifier: stringToBigInt,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
previewDeposit: {
|
|
72
|
+
name: 'preview-deposit',
|
|
73
|
+
description: 'get preview the amount of stv that would be received for a given asset amount',
|
|
74
|
+
arguments: {
|
|
75
|
+
_assets: {
|
|
76
|
+
name: 'assets',
|
|
77
|
+
description: 'the amount of assets to deposit (18 decimals)',
|
|
78
|
+
modifier: stringToBigInt,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/stv-pool/config.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,EACf,cAAc,GACf,MAAM,OAAO,CAAC;AAEf,MAAM,CAAC,MAAM,iBAAiB,GAAgD;IAC5E,iBAAiB,EAAE;QACjB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,kEAAkE;QACpE,SAAS,EAAE;YACT,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,4BAA4B;gBACzC,QAAQ,EAAE,eAAe;aAC1B;SACF;KACF;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,sEAAsE;QACxE,SAAS,EAAE;YACT,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,4BAA4B;gBACzC,QAAQ,EAAE,eAAe;aAC1B;SACF;KACF;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,uCAAuC;KACrD;IACD,8BAA8B,EAAE;QAC9B,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE,CAAC,MAAM,CAAC;QACjB,WAAW,EACT,yEAAyE;KAC5E;IACD,WAAW,EAAE;QACX,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,CAAC,IAAI,CAAC;QACf,WAAW,EAAE,0CAA0C;KACxD;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,wBAAwB;QAC9B,OAAO,EAAE,CAAC,KAAK,CAAC;QAChB,WAAW,EAAE,0DAA0D;KACxE;IACD,yBAAyB,EAAE;QACzB,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,CAAC,MAAM,CAAC;QACjB,WAAW,EACT,wEAAwE;KAC3E;IACD,eAAe,EAAE;QACf,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,iFAAiF;QACnF,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;gBAC7D,QAAQ,EAAE,cAAc;aACzB;SACF;KACF;IACD,aAAa,EAAE;QACb,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,gFAAgF;QAClF,SAAS,EAAE;YACT,IAAI,EAAE;gBACJ,IAAI,EAAE,KAAK;gBACX,WAAW,EAAE,2CAA2C;gBACxD,QAAQ,EAAE,cAAc;aACzB;SACF;KACF;IACD,cAAc,EAAE;QACd,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,+EAA+E;QACjF,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+CAA+C;gBAC5D,QAAQ,EAAE,cAAc;aACzB;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/stv-pool/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stvPool: import("commander").Command;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/stv-pool/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB;KACxC,OAAO,CAAC,UAAU,CAAC;KACnB,KAAK,CAAC,KAAK,CAAC;KACZ,WAAW,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|