@lidofinance/lsv-cli 1.0.0-alpha.13 → 1.0.0-alpha.14
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 +243 -120
- package/dist/abi/CLProofVerifier.js +279 -0
- package/dist/abi/CLProofVerifier.js.map +1 -0
- package/dist/abi/Dashboard.js +1060 -942
- package/dist/abi/Dashboard.js.map +1 -1
- package/dist/abi/Delegation.js +1260 -1129
- package/dist/abi/Delegation.js.map +1 -1
- package/dist/abi/LidoLocator.js +311 -270
- package/dist/abi/LidoLocator.js.map +1 -1
- package/dist/abi/PredepositGuarantee.js +1733 -0
- package/dist/abi/PredepositGuarantee.js.map +1 -0
- package/dist/abi/StakingVault.js +723 -528
- package/dist/abi/StakingVault.js.map +1 -1
- package/dist/abi/VaultFactory.js +164 -144
- package/dist/abi/VaultFactory.js.map +1 -1
- package/dist/abi/VaultHubViewer.js +297 -0
- package/dist/abi/VaultHubViewer.js.map +1 -0
- package/dist/abi/index.js +12 -9
- package/dist/abi/index.js.map +1 -1
- package/dist/contracts/clProofVerifier.js +29 -0
- package/dist/contracts/clProofVerifier.js.map +1 -0
- package/dist/contracts/dashboard.js.map +1 -1
- package/dist/contracts/index.js +12 -9
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/locator.js +2 -2
- package/dist/contracts/locator.js.map +1 -1
- package/dist/contracts/pdg.js +17 -0
- package/dist/contracts/pdg.js.map +1 -0
- package/dist/contracts/vault-factory.js +5 -9
- package/dist/contracts/vault-factory.js.map +1 -1
- package/dist/contracts/vault-hub-viewer.js +14 -0
- package/dist/contracts/vault-hub-viewer.js.map +1 -0
- package/dist/features/dashboard-delegation.js +4 -1
- package/dist/features/dashboard-delegation.js.map +1 -1
- package/dist/features/vault-factory.js +6 -10
- package/dist/features/vault-factory.js.map +1 -1
- package/dist/features/voting.js +6 -14
- package/dist/features/voting.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/programs/account.js +3 -1
- package/dist/programs/account.js.map +1 -1
- package/dist/programs/dashboard/config.js +65 -0
- package/dist/programs/dashboard/config.js.map +1 -0
- package/dist/programs/dashboard/index.js +4 -0
- package/dist/programs/dashboard/index.js.map +1 -0
- package/dist/programs/dashboard/main.js +12 -0
- package/dist/programs/dashboard/main.js.map +1 -0
- package/dist/programs/dashboard/read.js +25 -0
- package/dist/programs/dashboard/read.js.map +1 -0
- package/dist/programs/{dashboard.js → dashboard/write.js} +78 -136
- package/dist/programs/dashboard/write.js.map +1 -0
- package/dist/programs/delegation/config.js +33 -0
- package/dist/programs/delegation/config.js.map +1 -0
- package/dist/programs/delegation/index.js +4 -0
- package/dist/programs/delegation/index.js.map +1 -0
- package/dist/programs/delegation/main.js +12 -0
- package/dist/programs/delegation/main.js.map +1 -0
- package/dist/programs/delegation/read.js +98 -0
- package/dist/programs/delegation/read.js.map +1 -0
- package/dist/programs/delegation/write.js +327 -0
- package/dist/programs/delegation/write.js.map +1 -0
- package/dist/programs/index.js +7 -4
- package/dist/programs/index.js.map +1 -1
- package/dist/programs/pdg/config.js +2 -0
- package/dist/programs/pdg/config.js.map +1 -0
- package/dist/programs/pdg/index.js +4 -0
- package/dist/programs/pdg/index.js.map +1 -0
- package/dist/programs/pdg/main.js +12 -0
- package/dist/programs/pdg/main.js.map +1 -0
- package/dist/programs/pdg/read.js +7 -0
- package/dist/programs/pdg/read.js.map +1 -0
- package/dist/programs/pdg/write.js +64 -0
- package/dist/programs/pdg/write.js.map +1 -0
- package/dist/programs/predeposit-guarantee.js +73 -0
- package/dist/programs/predeposit-guarantee.js.map +1 -0
- package/dist/programs/vault/config.js +66 -0
- package/dist/programs/vault/config.js.map +1 -0
- package/dist/programs/vault/index.js +4 -0
- package/dist/programs/vault/index.js.map +1 -0
- package/dist/programs/vault/main.js +10 -0
- package/dist/programs/vault/main.js.map +1 -0
- package/dist/programs/vault/read.js +53 -0
- package/dist/programs/vault/read.js.map +1 -0
- package/dist/programs/vault/write.js +123 -0
- package/dist/programs/vault/write.js.map +1 -0
- package/dist/programs/vault-factory/config.js +2 -0
- package/dist/programs/vault-factory/config.js.map +1 -0
- package/dist/programs/vault-factory/index.js +4 -0
- package/dist/programs/vault-factory/index.js.map +1 -0
- package/dist/programs/vault-factory/main.js +12 -0
- package/dist/programs/vault-factory/main.js.map +1 -0
- package/dist/programs/vault-factory/read.js +26 -0
- package/dist/programs/vault-factory/read.js.map +1 -0
- package/dist/programs/{vault-factory.js → vault-factory/write.js} +22 -37
- package/dist/programs/vault-factory/write.js.map +1 -0
- package/dist/programs/vault-hub-viewer.js +52 -0
- package/dist/programs/vault-hub-viewer.js.map +1 -0
- package/dist/programs/vault-hub.js +20 -52
- package/dist/programs/vault-hub.js.map +1 -1
- package/dist/programs/voting.js +11 -33
- package/dist/programs/voting.js.map +1 -1
- package/dist/utils/contract.js +63 -2
- package/dist/utils/contract.js.map +1 -1
- package/dist/utils/get-commands.js +11 -0
- package/dist/utils/get-commands.js.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/prompts/default.js +17 -0
- package/dist/utils/prompts/default.js.map +1 -0
- package/dist/utils/prompts/delegation-dashboard.js +29 -0
- package/dist/utils/prompts/delegation-dashboard.js.map +1 -0
- package/dist/utils/prompts/index.js +4 -0
- package/dist/utils/prompts/index.js.map +1 -0
- package/dist/utils/prompts/predeposit-guarantee.js +25 -0
- package/dist/utils/prompts/predeposit-guarantee.js.map +1 -0
- package/dist/utils/proof/create-proof.js +62 -0
- package/dist/utils/proof/create-proof.js.map +1 -0
- package/dist/utils/proof/first-validator-gindex.js +26 -0
- package/dist/utils/proof/first-validator-gindex.js.map +1 -0
- package/dist/utils/proof/index.js +4 -0
- package/dist/utils/proof/index.js.map +1 -0
- package/dist/utils/proof/merkle-utils.js +131 -0
- package/dist/utils/proof/merkle-utils.js.map +1 -0
- package/dist/utils/proof/proofs.js +52 -0
- package/dist/utils/proof/proofs.js.map +1 -0
- package/dist/utils/read-programs-by-abi.js +83 -0
- package/dist/utils/read-programs-by-abi.js.map +1 -0
- package/dist/utils/spinner/index.js +2 -0
- package/dist/utils/spinner/index.js.map +1 -0
- package/dist/utils/spinner/spinners.js +16 -0
- package/dist/utils/spinner/spinners.js.map +1 -0
- package/dist/utils/spinner/spinners.json +119 -0
- package/dist/version/index.js +1 -1
- package/package.json +11 -4
- package/dist/programs/dashboard.js.map +0 -1
- package/dist/programs/delegation.js +0 -581
- package/dist/programs/delegation.js.map +0 -1
- package/dist/programs/vault-factory.js.map +0 -1
- package/dist/programs/vault.js +0 -375
- package/dist/programs/vault.js.map +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { DelegationAbi } from '../../abi/index.js';
|
|
2
|
+
import { getDelegationContract, getStakingVaultContract } from '../../contracts/index.js';
|
|
3
|
+
import { generateReadCommands } from '../../utils/index.js';
|
|
4
|
+
import { getBaseInfo } from '../../features/index.js';
|
|
5
|
+
import { delegation } from './main.js';
|
|
6
|
+
import { readCommandConfig } from './config.js';
|
|
7
|
+
generateReadCommands(DelegationAbi, getDelegationContract, delegation, readCommandConfig);
|
|
8
|
+
delegation
|
|
9
|
+
.command('roles')
|
|
10
|
+
.description('get delegation contract roles info')
|
|
11
|
+
.argument('<address>', 'delegation contract address')
|
|
12
|
+
.action(async (address) => {
|
|
13
|
+
const contract = getDelegationContract(address);
|
|
14
|
+
// TODO: check roles
|
|
15
|
+
try {
|
|
16
|
+
const CURATOR_FEE_CLAIM_ROLE = await contract.read.CURATOR_FEE_CLAIM_ROLE();
|
|
17
|
+
const CURATOR_FEE_SET_ROLE = await contract.read.CURATOR_FEE_SET_ROLE();
|
|
18
|
+
const NODE_OPERATOR_MANAGER_ROLE = await contract.read.NODE_OPERATOR_MANAGER_ROLE();
|
|
19
|
+
const NODE_OPERATOR_FEE_CLAIMER_ROLE = await contract.read.NODE_OPERATOR_FEE_CLAIM_ROLE();
|
|
20
|
+
const FUND_ROLE = await contract.read.FUND_ROLE();
|
|
21
|
+
const WITHDRAW_ROLE = await contract.read.WITHDRAW_ROLE();
|
|
22
|
+
const MINT_ROLE = await contract.read.MINT_ROLE();
|
|
23
|
+
const BURN_ROLE = await contract.read.BURN_ROLE();
|
|
24
|
+
const REBALANCE_ROLE = await contract.read.REBALANCE_ROLE();
|
|
25
|
+
const PAUSE_BEACON_CHAIN_DEPOSITS_ROLE = await contract.read.PAUSE_BEACON_CHAIN_DEPOSITS_ROLE();
|
|
26
|
+
const RESUME_BEACON_CHAIN_DEPOSITS_ROLE = await contract.read.RESUME_BEACON_CHAIN_DEPOSITS_ROLE();
|
|
27
|
+
const REQUEST_VALIDATOR_EXIT_ROLE = await contract.read.REQUEST_VALIDATOR_EXIT_ROLE();
|
|
28
|
+
const VOLUNTARY_DISCONNECT_ROLE = await contract.read.VOLUNTARY_DISCONNECT_ROLE();
|
|
29
|
+
const TRIGGER_VALIDATOR_WITHDRAWAL_ROLE = await contract.read.TRIGGER_VALIDATOR_WITHDRAWAL_ROLE();
|
|
30
|
+
const PDG_WITHDRAWAL_ROLE = await contract.read.PDG_WITHDRAWAL_ROLE();
|
|
31
|
+
const ASSET_RECOVERY_ROLE = await contract.read.ASSET_RECOVERY_ROLE();
|
|
32
|
+
const payload = {
|
|
33
|
+
CURATOR_FEE_CLAIM_ROLE,
|
|
34
|
+
CURATOR_FEE_SET_ROLE,
|
|
35
|
+
NODE_OPERATOR_MANAGER_ROLE,
|
|
36
|
+
NODE_OPERATOR_FEE_CLAIMER_ROLE,
|
|
37
|
+
FUND_ROLE,
|
|
38
|
+
WITHDRAW_ROLE,
|
|
39
|
+
MINT_ROLE,
|
|
40
|
+
BURN_ROLE,
|
|
41
|
+
REBALANCE_ROLE,
|
|
42
|
+
PAUSE_BEACON_CHAIN_DEPOSITS_ROLE,
|
|
43
|
+
RESUME_BEACON_CHAIN_DEPOSITS_ROLE,
|
|
44
|
+
REQUEST_VALIDATOR_EXIT_ROLE,
|
|
45
|
+
VOLUNTARY_DISCONNECT_ROLE,
|
|
46
|
+
TRIGGER_VALIDATOR_WITHDRAWAL_ROLE,
|
|
47
|
+
PDG_WITHDRAWAL_ROLE,
|
|
48
|
+
ASSET_RECOVERY_ROLE,
|
|
49
|
+
};
|
|
50
|
+
console.table(Object.entries(payload));
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
if (err instanceof Error) {
|
|
54
|
+
console.info('Error when getting roles:\n', err.message);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
delegation
|
|
59
|
+
.command('base-info')
|
|
60
|
+
.description('get delegation base info')
|
|
61
|
+
.argument('<address>', 'delegation address')
|
|
62
|
+
.action(async (address) => {
|
|
63
|
+
const contract = getDelegationContract(address);
|
|
64
|
+
await getBaseInfo(contract);
|
|
65
|
+
});
|
|
66
|
+
delegation
|
|
67
|
+
.command('is-healthy')
|
|
68
|
+
.description('get vault healthy info')
|
|
69
|
+
.argument('<address>', 'vault address')
|
|
70
|
+
.action(async (address) => {
|
|
71
|
+
const contract = getDelegationContract(address);
|
|
72
|
+
try {
|
|
73
|
+
const valuation = await contract.read.valuation();
|
|
74
|
+
const curatorUnclaimedFee = await contract.read.curatorUnclaimedFee();
|
|
75
|
+
const nodeOperatorUnclaimedFee = await contract.read.nodeOperatorUnclaimedFee();
|
|
76
|
+
const minted = await contract.read.sharesMinted();
|
|
77
|
+
const { vault } = await contract.read.vaultSocket();
|
|
78
|
+
const vaultContract = getStakingVaultContract(vault);
|
|
79
|
+
const locked = await vaultContract.read.locked();
|
|
80
|
+
const reserved = locked + curatorUnclaimedFee + nodeOperatorUnclaimedFee;
|
|
81
|
+
const valuationPerc = (valuation / (reserved + minted)) * 100n;
|
|
82
|
+
const isHealthy = valuationPerc >= 100n;
|
|
83
|
+
console.table({
|
|
84
|
+
'Vault Healthy': isHealthy,
|
|
85
|
+
Valuation: valuation,
|
|
86
|
+
'Curator Unclaimed Fee': curatorUnclaimedFee,
|
|
87
|
+
'Node Operator Unclaimed Fee': nodeOperatorUnclaimedFee,
|
|
88
|
+
Minted: minted,
|
|
89
|
+
Reserved: reserved,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
if (err instanceof Error) {
|
|
94
|
+
console.info('Error when getting info:\n', err.message);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=read.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../programs/delegation/read.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,oBAAoB,CAClB,aAAa,EACb,qBAAqB,EACrB,UAAU,EACV,iBAAiB,CAClB,CAAC;AAEF,UAAU;KACP,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,oCAAoC,CAAC;KACjD,QAAQ,CAAC,WAAW,EAAE,6BAA6B,CAAC;KACpD,MAAM,CAAC,KAAK,EAAE,OAAgB,EAAE,EAAE;IACjC,MAAM,QAAQ,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAEhD,oBAAoB;IACpB,IAAI,CAAC;QACH,MAAM,sBAAsB,GAC1B,MAAM,QAAQ,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC/C,MAAM,oBAAoB,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACxE,MAAM,0BAA0B,GAC9B,MAAM,QAAQ,CAAC,IAAI,CA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AAC,WAAW,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;QACrD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAEjD,MAAM,QAAQ,GAAG,MAAM,GAAG,mBAAmB,GAAG,wBAAwB,CAAC;QACzE,MAAM,aAAa,GAAG,CAAC,SAAS,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC;QAC/D,MAAM,SAAS,GAAG,aAAa,IAAI,IAAI,CAAC;QAExC,OAAO,CAAC,KAAK,CAAC;YACZ,eAAe,EAAE,SAAS;YAC1B,SAAS,EAAE,SAAS;YACpB,uBAAuB,EAAE,mBAAmB;YAC5C,6BAA6B,EAAE,wBAAwB;YACvD,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { getDelegationContract } from '../../contracts/index.js';
|
|
2
|
+
import { callWriteMethodWithReceipt } from '../../utils/index.js';
|
|
3
|
+
import { delegation } from './main.js';
|
|
4
|
+
delegation
|
|
5
|
+
.command('cf-set')
|
|
6
|
+
.description('sets the curator fee')
|
|
7
|
+
.argument('<address>', 'delegation contract address')
|
|
8
|
+
.argument('<newCuratorFee>', 'curator fee in basis points')
|
|
9
|
+
.action(async (address, newCuratorFee) => {
|
|
10
|
+
const contract = getDelegationContract(address);
|
|
11
|
+
await callWriteMethodWithReceipt(contract, 'setCuratorFeeBP', [
|
|
12
|
+
BigInt(newCuratorFee),
|
|
13
|
+
]);
|
|
14
|
+
});
|
|
15
|
+
delegation
|
|
16
|
+
.command('cf-claim')
|
|
17
|
+
.description('claims the curator fee')
|
|
18
|
+
.argument('<address>', 'delegation contract address')
|
|
19
|
+
.argument('<recipient>', 'address to which the curator fee will be sent')
|
|
20
|
+
.action(async (address, recipient) => {
|
|
21
|
+
const contract = getDelegationContract(address);
|
|
22
|
+
await callWriteMethodWithReceipt(contract, 'claimCuratorFee', [recipient]);
|
|
23
|
+
});
|
|
24
|
+
delegation
|
|
25
|
+
.command('nof-set')
|
|
26
|
+
.description('sets the node operator fee')
|
|
27
|
+
.argument('<address>', 'delegation contract address')
|
|
28
|
+
.argument('<newNodeOperatorFeeBP>', 'The new node operator fee in basis points')
|
|
29
|
+
.action(async (address, newNodeOperatorFeeBP) => {
|
|
30
|
+
const contract = getDelegationContract(address);
|
|
31
|
+
await callWriteMethodWithReceipt(contract, 'setNodeOperatorFeeBP', [
|
|
32
|
+
BigInt(newNodeOperatorFeeBP),
|
|
33
|
+
]);
|
|
34
|
+
});
|
|
35
|
+
delegation
|
|
36
|
+
.command('nof-claim')
|
|
37
|
+
.description('claims the node operator fee')
|
|
38
|
+
.argument('<address>', 'delegation contract address')
|
|
39
|
+
.argument('<recipient>', 'address to which the node operator fee will be sent')
|
|
40
|
+
.action(async (address, recipient) => {
|
|
41
|
+
const contract = getDelegationContract(address);
|
|
42
|
+
await callWriteMethodWithReceipt(contract, 'claimNodeOperatorFee', [
|
|
43
|
+
recipient,
|
|
44
|
+
]);
|
|
45
|
+
});
|
|
46
|
+
delegation
|
|
47
|
+
.command('fund')
|
|
48
|
+
.description('funds the StakingVault with ether')
|
|
49
|
+
.argument('<address>', 'delegation contract address')
|
|
50
|
+
.argument('<wei>', 'ether to fund (in WEI)')
|
|
51
|
+
.action(async (address, ether) => {
|
|
52
|
+
const contract = getDelegationContract(address);
|
|
53
|
+
await callWriteMethodWithReceipt(contract, 'fund', [], BigInt(ether));
|
|
54
|
+
});
|
|
55
|
+
delegation
|
|
56
|
+
.command('withdraw')
|
|
57
|
+
.description('withdraws ether from the StakingVault')
|
|
58
|
+
.argument('<address>', 'delegation contract address')
|
|
59
|
+
.argument('<recipient>', 'address to which the ether will be sent')
|
|
60
|
+
.argument('<wei>', 'ether to found (in WEI)')
|
|
61
|
+
.action(async (address, recipient, ether) => {
|
|
62
|
+
const contract = getDelegationContract(address);
|
|
63
|
+
await callWriteMethodWithReceipt(contract, 'withdraw', [
|
|
64
|
+
recipient,
|
|
65
|
+
BigInt(ether),
|
|
66
|
+
]);
|
|
67
|
+
});
|
|
68
|
+
delegation
|
|
69
|
+
.command('rebalance')
|
|
70
|
+
.description('rebalances the StakingVault with a given amount of ether')
|
|
71
|
+
.argument('<address>', 'delegation contract address')
|
|
72
|
+
.argument('<ether>', 'amount of ether to rebalance with')
|
|
73
|
+
.action(async (address, ether) => {
|
|
74
|
+
const contract = getDelegationContract(address);
|
|
75
|
+
await callWriteMethodWithReceipt(contract, 'rebalanceVault', [
|
|
76
|
+
BigInt(ether),
|
|
77
|
+
]);
|
|
78
|
+
});
|
|
79
|
+
// TODO: test without voting
|
|
80
|
+
delegation
|
|
81
|
+
.command('t-ownership')
|
|
82
|
+
.description('transfers the ownership of the StakingVault')
|
|
83
|
+
.argument('<address>', 'delegation contract address')
|
|
84
|
+
.argument('<newOwner>', 'address to which the ownership will be transferred')
|
|
85
|
+
.action(async (address, newOwner) => {
|
|
86
|
+
const contract = getDelegationContract(address);
|
|
87
|
+
await callWriteMethodWithReceipt(contract, 'transferStakingVaultOwnership', [newOwner]);
|
|
88
|
+
});
|
|
89
|
+
delegation
|
|
90
|
+
.command('disconnect')
|
|
91
|
+
.description('voluntarily disconnects a StakingVault from VaultHub')
|
|
92
|
+
.argument('<address>', 'delegation contract address')
|
|
93
|
+
.action(async (address) => {
|
|
94
|
+
const contract = getDelegationContract(address);
|
|
95
|
+
await callWriteMethodWithReceipt(contract, 'voluntaryDisconnect', []);
|
|
96
|
+
});
|
|
97
|
+
delegation
|
|
98
|
+
.command('deposit-pause')
|
|
99
|
+
.description('Pauses deposits to beacon chain from the StakingVault.')
|
|
100
|
+
.argument('<address>', 'delegation contract address')
|
|
101
|
+
.action(async (address) => {
|
|
102
|
+
const contract = getDelegationContract(address);
|
|
103
|
+
await callWriteMethodWithReceipt(contract, 'pauseBeaconChainDeposits', []);
|
|
104
|
+
});
|
|
105
|
+
delegation
|
|
106
|
+
.command('deposit-resume')
|
|
107
|
+
.description('Resumes deposits to beacon chain from the StakingVault.')
|
|
108
|
+
.argument('<address>', 'delegation contract address')
|
|
109
|
+
.action(async (address) => {
|
|
110
|
+
const contract = getDelegationContract(address);
|
|
111
|
+
await callWriteMethodWithReceipt(contract, 'resumeBeaconChainDeposits', []);
|
|
112
|
+
});
|
|
113
|
+
delegation
|
|
114
|
+
.command('fund-weth')
|
|
115
|
+
.description('funds the staking vault with wrapped ether')
|
|
116
|
+
.argument('<address>', 'delegation address')
|
|
117
|
+
.argument('<wethAmount>', 'amount of weth to be funded')
|
|
118
|
+
.action(async (address, wethAmount) => {
|
|
119
|
+
const contract = getDelegationContract(address);
|
|
120
|
+
await callWriteMethodWithReceipt(contract, 'fundWeth', [
|
|
121
|
+
BigInt(wethAmount),
|
|
122
|
+
]);
|
|
123
|
+
});
|
|
124
|
+
delegation
|
|
125
|
+
.command('withdraw-weth')
|
|
126
|
+
.description('withdraws stETH tokens from the staking vault to wrapped ether')
|
|
127
|
+
.argument('<address>', 'delegation address')
|
|
128
|
+
.argument('<recipient>', 'address of the recipient')
|
|
129
|
+
.argument('<ether>', 'amount of ether to withdraw')
|
|
130
|
+
.action(async (address, recipient, ether) => {
|
|
131
|
+
const contract = getDelegationContract(address);
|
|
132
|
+
await callWriteMethodWithReceipt(contract, 'withdrawWETH', [
|
|
133
|
+
recipient,
|
|
134
|
+
BigInt(ether),
|
|
135
|
+
]);
|
|
136
|
+
});
|
|
137
|
+
delegation
|
|
138
|
+
.command('exit')
|
|
139
|
+
.description('requests the exit of a validator from the staking vault')
|
|
140
|
+
.argument('<address>', 'delegation address')
|
|
141
|
+
.argument('<validatorPubKey>', 'public key of the validator to exit')
|
|
142
|
+
.action(async (address, validatorPubKey) => {
|
|
143
|
+
const contract = getDelegationContract(address);
|
|
144
|
+
await callWriteMethodWithReceipt(contract, 'requestValidatorExit', [
|
|
145
|
+
validatorPubKey,
|
|
146
|
+
]);
|
|
147
|
+
});
|
|
148
|
+
delegation
|
|
149
|
+
.command('mint-shares')
|
|
150
|
+
.description('mints stETH tokens backed by the vault to a recipient')
|
|
151
|
+
.argument('<address>', 'delegation address')
|
|
152
|
+
.argument('<recipient>', 'address of the recipient')
|
|
153
|
+
.argument('<amountOfShares>', 'amount of shares to mint')
|
|
154
|
+
.action(async (address, recipient, amountOfShares) => {
|
|
155
|
+
const contract = getDelegationContract(address);
|
|
156
|
+
await callWriteMethodWithReceipt(contract, 'mintShares', [
|
|
157
|
+
recipient,
|
|
158
|
+
BigInt(amountOfShares),
|
|
159
|
+
]);
|
|
160
|
+
});
|
|
161
|
+
delegation
|
|
162
|
+
.command('mint-steth')
|
|
163
|
+
.description('mints stETH tokens backed by the vault to a recipient')
|
|
164
|
+
.argument('<address>', 'delegation address')
|
|
165
|
+
.argument('<recipient>', 'address of the recipient')
|
|
166
|
+
.argument('<amountOfShares>', 'amount of shares to mint')
|
|
167
|
+
.action(async (address, recipient, amountOfShares) => {
|
|
168
|
+
const contract = getDelegationContract(address);
|
|
169
|
+
await callWriteMethodWithReceipt(contract, 'mintStETH', [
|
|
170
|
+
recipient,
|
|
171
|
+
BigInt(amountOfShares),
|
|
172
|
+
]);
|
|
173
|
+
});
|
|
174
|
+
delegation
|
|
175
|
+
.command('mint-wsteth')
|
|
176
|
+
.description('mints wstETH tokens backed by the vault to a recipient')
|
|
177
|
+
.argument('<address>', 'delegation address')
|
|
178
|
+
.argument('<recipient>', 'address of the recipient')
|
|
179
|
+
.argument('<tokens>', 'amount of tokens to mint')
|
|
180
|
+
.action(async (address, recipient, tokens) => {
|
|
181
|
+
const contract = getDelegationContract(address);
|
|
182
|
+
await callWriteMethodWithReceipt(contract, 'mintWstETH', [
|
|
183
|
+
recipient,
|
|
184
|
+
BigInt(tokens),
|
|
185
|
+
]);
|
|
186
|
+
});
|
|
187
|
+
delegation
|
|
188
|
+
.command('burn-shares')
|
|
189
|
+
.description('Burns stETH shares from the sender backed by the vault. Expects corresponding amount of stETH approved to this contract')
|
|
190
|
+
.argument('<address>', 'delegation address')
|
|
191
|
+
.argument('<amountOfShares>', 'amount of shares to burn')
|
|
192
|
+
.action(async (address, amountOfShares) => {
|
|
193
|
+
const contract = getDelegationContract(address);
|
|
194
|
+
await callWriteMethodWithReceipt(contract, 'burnShares', [
|
|
195
|
+
BigInt(amountOfShares),
|
|
196
|
+
]);
|
|
197
|
+
});
|
|
198
|
+
delegation
|
|
199
|
+
.command('burn-steth')
|
|
200
|
+
.description('Burns stETH shares from the sender backed by the vault. Expects stETH amount approved to this contract.')
|
|
201
|
+
.argument('<address>', 'delegation address')
|
|
202
|
+
.argument('<amountOfShares>', 'amount of shares to burn')
|
|
203
|
+
.action(async (address, amountOfShares) => {
|
|
204
|
+
const contract = getDelegationContract(address);
|
|
205
|
+
await callWriteMethodWithReceipt(contract, 'burnStETH', [
|
|
206
|
+
BigInt(amountOfShares),
|
|
207
|
+
]);
|
|
208
|
+
});
|
|
209
|
+
delegation
|
|
210
|
+
.command('burn-wsteth')
|
|
211
|
+
.description('burn wstETH tokens from the sender backed by the vault')
|
|
212
|
+
.argument('<address>', 'delegation address')
|
|
213
|
+
.argument('<tokens>', 'amount of wstETH tokens to burn')
|
|
214
|
+
.action(async (address, tokens) => {
|
|
215
|
+
const contract = getDelegationContract(address);
|
|
216
|
+
await callWriteMethodWithReceipt(contract, 'burnWstETH', [BigInt(tokens)]);
|
|
217
|
+
});
|
|
218
|
+
delegation
|
|
219
|
+
.command('burn-shares-permit')
|
|
220
|
+
.description('Burns stETH tokens (in shares) backed by the vault from the sender using permit (with value in stETH).')
|
|
221
|
+
.argument('<address>', 'delegation address')
|
|
222
|
+
.argument('<tokens>', 'amount of stETH tokens to burn')
|
|
223
|
+
.argument('<permitJSON>', 'JSON data required for the stETH.permit() method to set the allowance')
|
|
224
|
+
.action(async (address, tokens, permitJSON) => {
|
|
225
|
+
const permit = JSON.parse(permitJSON);
|
|
226
|
+
const contract = getDelegationContract(address);
|
|
227
|
+
await callWriteMethodWithReceipt(contract, 'burnSharesWithPermit', [
|
|
228
|
+
BigInt(tokens),
|
|
229
|
+
permit,
|
|
230
|
+
]);
|
|
231
|
+
});
|
|
232
|
+
delegation
|
|
233
|
+
.command('burn-steth-permit')
|
|
234
|
+
.description('Burns stETH tokens backed by the vault from the sender using permit.')
|
|
235
|
+
.argument('<address>', 'delegation address')
|
|
236
|
+
.argument('<tokens>', 'amount of stETH tokens to burn')
|
|
237
|
+
.argument('<permitJSON>', 'JSON data required for the stETH.permit() method to set the allowance')
|
|
238
|
+
.action(async (address, tokens, permitJSON) => {
|
|
239
|
+
const permit = JSON.parse(permitJSON);
|
|
240
|
+
const contract = getDelegationContract(address);
|
|
241
|
+
await callWriteMethodWithReceipt(contract, 'burnStETHWithPermit', [
|
|
242
|
+
BigInt(tokens),
|
|
243
|
+
permit,
|
|
244
|
+
]);
|
|
245
|
+
});
|
|
246
|
+
delegation
|
|
247
|
+
.command('burn-wsteth-permit')
|
|
248
|
+
.description('burn wstETH tokens from the sender backed by the vault using EIP-2612 Permit')
|
|
249
|
+
.argument('<address>', 'delegation address')
|
|
250
|
+
.argument('<tokens>', 'amount of wstETH tokens to burn')
|
|
251
|
+
.argument('<permitJSON>', 'JSON data required for the wstETH.permit() method to set the allowance')
|
|
252
|
+
.action(async (address, tokens, permitJSON) => {
|
|
253
|
+
const permit = JSON.parse(permitJSON);
|
|
254
|
+
const contract = getDelegationContract(address);
|
|
255
|
+
await callWriteMethodWithReceipt(contract, 'burnWstETHWithPermit', [
|
|
256
|
+
BigInt(tokens),
|
|
257
|
+
permit,
|
|
258
|
+
]);
|
|
259
|
+
});
|
|
260
|
+
delegation
|
|
261
|
+
.command('recover-erc20')
|
|
262
|
+
.description('recovers ERC20 tokens or ether from the delegation contract to sender')
|
|
263
|
+
.argument('<address>', 'delegation address')
|
|
264
|
+
.argument('<token>', 'Address of the token to recover or 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee for ether')
|
|
265
|
+
.argument('<recipient>', 'Address of the recovery recipient')
|
|
266
|
+
.argument('<amount>', 'amount of ether to recover')
|
|
267
|
+
.action(async (address, token, recipient, amount) => {
|
|
268
|
+
const contract = getDelegationContract(address);
|
|
269
|
+
await callWriteMethodWithReceipt(contract, 'recoverERC20', [
|
|
270
|
+
token,
|
|
271
|
+
recipient,
|
|
272
|
+
BigInt(amount),
|
|
273
|
+
]);
|
|
274
|
+
});
|
|
275
|
+
delegation
|
|
276
|
+
.command('recover-erc721')
|
|
277
|
+
.description('Transfers a given token_id of an ERC721-compatible NFT (defined by the token contract address)')
|
|
278
|
+
.argument('<address>', 'delegation address')
|
|
279
|
+
.argument('<token>', 'an ERC721-compatible token')
|
|
280
|
+
.argument('<tokenId>', 'token id to recover')
|
|
281
|
+
.argument('<recipient>', 'Address of the recovery recipient')
|
|
282
|
+
.action(async (address, token, tokenId, recipient) => {
|
|
283
|
+
const contract = getDelegationContract(address);
|
|
284
|
+
await callWriteMethodWithReceipt(contract, 'recoverERC721', [
|
|
285
|
+
token,
|
|
286
|
+
BigInt(tokenId),
|
|
287
|
+
recipient,
|
|
288
|
+
]);
|
|
289
|
+
});
|
|
290
|
+
delegation
|
|
291
|
+
.command('role-grant')
|
|
292
|
+
.description('Mass-revokes multiple roles from multiple accounts.')
|
|
293
|
+
.argument('<address>', 'delegation address')
|
|
294
|
+
.argument('<roleAssignmentJSON>', 'JSON array of role assignments')
|
|
295
|
+
.action(async (address, roleAssignmentJSON) => {
|
|
296
|
+
const contract = getDelegationContract(address);
|
|
297
|
+
const payload = JSON.parse(roleAssignmentJSON);
|
|
298
|
+
if (!Array.isArray(payload)) {
|
|
299
|
+
throw new Error('the 2nd argument should be an array of role assignments');
|
|
300
|
+
}
|
|
301
|
+
await callWriteMethodWithReceipt(contract, 'grantRoles', [payload]);
|
|
302
|
+
});
|
|
303
|
+
delegation
|
|
304
|
+
.command('role-revoke')
|
|
305
|
+
.description('Resumes beacon chain deposits on the staking vault.')
|
|
306
|
+
.argument('<address>', 'delegation address')
|
|
307
|
+
.argument('<roleAssignmentJSON>', 'JSON array of role assignments')
|
|
308
|
+
.action(async (address, roleAssignmentJSON) => {
|
|
309
|
+
const contract = getDelegationContract(address);
|
|
310
|
+
const payload = JSON.parse(roleAssignmentJSON);
|
|
311
|
+
if (!Array.isArray(payload)) {
|
|
312
|
+
throw new Error('the 2nd argument should be an array of role assignments');
|
|
313
|
+
}
|
|
314
|
+
await callWriteMethodWithReceipt(contract, 'revokeRoles', [payload]);
|
|
315
|
+
});
|
|
316
|
+
delegation
|
|
317
|
+
.command('set-confirm-expiry')
|
|
318
|
+
.description('set the confirmation expiry')
|
|
319
|
+
.argument('<address>', 'delegation address')
|
|
320
|
+
.argument('<newConfirmExpiry>', 'new confirmation expiry')
|
|
321
|
+
.action(async (address, newConfirmExpiry) => {
|
|
322
|
+
const contract = getDelegationContract(address);
|
|
323
|
+
await callWriteMethodWithReceipt(contract, 'setConfirmExpiry', [
|
|
324
|
+
BigInt(newConfirmExpiry),
|
|
325
|
+
]);
|
|
326
|
+
});
|
|
327
|
+
//# sourceMappingURL=write.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../programs/delegation/write.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,0BAA0B,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,UAAU;KACP,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,sBAAsB,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E,gBAAwB,EAAE,EAAE;IAC3D,MAAM,QAAQ,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAEhD,MAAM,0BAA0B,CAAC,QAAQ,EAAE,kBAAkB,EAAE;QAC7D,MAAM,CAAC,gBAAgB,CAAC;KACzB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/programs/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * from './vault-hub.js';
|
|
2
|
-
export * from './vault.js';
|
|
3
|
-
export * from './vault-factory.js';
|
|
4
|
-
export * from './dashboard.js';
|
|
5
|
-
export * from './delegation.js';
|
|
6
2
|
export * from './voting.js';
|
|
7
3
|
export * from './account.js';
|
|
4
|
+
export * from './vault-hub-viewer.js';
|
|
5
|
+
export * from './predeposit-guarantee.js';
|
|
6
|
+
export * from './vault/index.js';
|
|
7
|
+
export * from './dashboard/index.js';
|
|
8
|
+
export * from './vault-factory/index.js';
|
|
9
|
+
export * from './delegation/index.js';
|
|
10
|
+
export * from './pdg/index.js';
|
|
8
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../programs/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../programs/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../programs/pdg/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAA6B,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../programs/pdg/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { program } from '../../command/index.js';
|
|
2
|
+
import { Option } from 'commander';
|
|
3
|
+
import { getCommandsJson } from '../../utils/index.js';
|
|
4
|
+
export const pdg = program
|
|
5
|
+
.command('pdg')
|
|
6
|
+
.description('predeposit guarantee contract');
|
|
7
|
+
pdg.addOption(new Option('-cmd2json'));
|
|
8
|
+
pdg.on('option:-cmd2json', function () {
|
|
9
|
+
console.info(getCommandsJson(pdg));
|
|
10
|
+
process.exit();
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../programs/pdg/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO;KACvB,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,+BAA+B,CAAC,CAAC;AAEhD,GAAG,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AACvC,GAAG,CAAC,EAAE,CAAC,kBAAkB,EAAE;IACzB,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { generateReadCommands } from '../../utils/index.js';
|
|
2
|
+
import { PredepositGuaranteeAbi } from '../../abi/index.js';
|
|
3
|
+
import { pdg } from './main.js';
|
|
4
|
+
import { readCommandConfig } from './config.js';
|
|
5
|
+
import { getPredepositGuaranteeContract } from '../../contracts/index.js';
|
|
6
|
+
generateReadCommands(PredepositGuaranteeAbi, getPredepositGuaranteeContract, pdg, readCommandConfig);
|
|
7
|
+
//# sourceMappingURL=read.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../programs/pdg/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAE7C,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAE3D,oBAAoB,CAClB,sBAAsB,EACtB,8BAA8B,EAC9B,GAAG,EACH,iBAAiB,CAClB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getPredepositGuaranteeContract } from '../../contracts/index.js';
|
|
2
|
+
import { callWriteMethodWithReceipt, confirmCreateProof, createPDGProof, showSpinner, printError, } from '../../utils/index.js';
|
|
3
|
+
import { pdg } from './main.js';
|
|
4
|
+
pdg
|
|
5
|
+
.command('predeposit')
|
|
6
|
+
.description('predeposit')
|
|
7
|
+
.argument('<vault>', 'vault address')
|
|
8
|
+
.argument('<deposits>', 'deposits')
|
|
9
|
+
.action(async (vault, deposits) => {
|
|
10
|
+
const pdgContract = await getPredepositGuaranteeContract();
|
|
11
|
+
await callWriteMethodWithReceipt(pdgContract, 'predeposit', [
|
|
12
|
+
vault,
|
|
13
|
+
deposits,
|
|
14
|
+
]);
|
|
15
|
+
});
|
|
16
|
+
pdg
|
|
17
|
+
.command('create-proof-and-prove')
|
|
18
|
+
.description('create proof and prove')
|
|
19
|
+
.argument('<index>', 'validator index')
|
|
20
|
+
.action(async (index) => {
|
|
21
|
+
const pdgContract = await getPredepositGuaranteeContract();
|
|
22
|
+
const validatorIndex = await confirmCreateProof(index);
|
|
23
|
+
if (!validatorIndex)
|
|
24
|
+
return;
|
|
25
|
+
const hideSpinner = showSpinner({
|
|
26
|
+
type: 'bouncingBar',
|
|
27
|
+
message: 'Creating proof...',
|
|
28
|
+
});
|
|
29
|
+
try {
|
|
30
|
+
const packageProof = await createPDGProof(Number(validatorIndex));
|
|
31
|
+
hideSpinner();
|
|
32
|
+
const { proof, pubkey, childBlockTimestamp, withdrawalCredentials } = packageProof;
|
|
33
|
+
console.info('----------------------proof----------------------');
|
|
34
|
+
console.info(proof);
|
|
35
|
+
console.info('---------------------pubkey---------------------');
|
|
36
|
+
console.table(pubkey);
|
|
37
|
+
console.info('---------------childBlockTimestamp---------------');
|
|
38
|
+
console.table(childBlockTimestamp);
|
|
39
|
+
console.info('--------------withdrawalCredentials--------------');
|
|
40
|
+
console.table(withdrawalCredentials);
|
|
41
|
+
console.info('------------------------------------------------');
|
|
42
|
+
console.info('-----------------------end-----------------------');
|
|
43
|
+
await callWriteMethodWithReceipt(pdgContract, 'proveValidatorWC', [
|
|
44
|
+
{ proof, pubkey, validatorIndex, childBlockTimestamp },
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
hideSpinner();
|
|
49
|
+
printError(err, 'Error when creating proof');
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
pdg
|
|
53
|
+
.command('deposit-to-beacon-chain')
|
|
54
|
+
.description('deposit to beacon chain')
|
|
55
|
+
.argument('<vault>', 'vault address')
|
|
56
|
+
.argument('<deposits>', 'deposits')
|
|
57
|
+
.action(async (vault, deposits) => {
|
|
58
|
+
const pdgContract = await getPredepositGuaranteeContract();
|
|
59
|
+
await callWriteMethodWithReceipt(pdgContract, 'depositToBeaconChain', [
|
|
60
|
+
vault,
|
|
61
|
+
deposits,
|
|
62
|
+
]);
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=write.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../programs/pdg/write.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,UAAU,GACX,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAShC,GAAG;KACA,OAAO,CAAC,YAAY,CAAC;KACrB,WAAW,CAAC,YAAY,CAAC;KACzB,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;KACpC,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC;KAClC,MAAM,CAAC,KAAK,EAAE,KAAc,EAAE,QAAmB,EAAE,EAAE;IACpD,MAAM,WAAW,GAAG,MAAM,8BAA8B,EAAE,CAAC;IAE3D,MAAM,0BAA0B,CAAC,WAAW,EAAE,YAAY,EAAE;QAC1D,KAAK;QACL,QAAQ;KACT,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,GAAG;KACA,OAAO,CAAC,wBAAwB,CAAC;KACjC,WAAW,CAAC,wBAAwB,CAAC;KACrC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;KACtC,MAAM,CAAC,KAAK,EAAE,KAAa,EAAE,EAAE;IAC9B,MAAM,WAAW,GAAG,MAAM,8BAA8B,EAAE,CAAC;IAE3D,MAAM,cAAc,GAAG,MAAM,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACvD,IAAI,CAAC,cAAc;QAAE,OAAO;IAE5B,MAAM,WAAW,GAAG,WAAW,CAAC;QAC9B,IAAI,EAAE,aAAa;QACnB,OAAO,EAA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