Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the stVaults Predeposit Guarantee (PDG) user guide to include stVaults CLI references and inline CLI command examples for the PDG flows, making the guide easier to follow for operators using the CLI.
Changes:
- Added resource links to the stVaults CLI repository and hosted documentation.
- Added collapsible “using Command-line Interface” sections with
yarn start ...commands for key steps in the PDG full-cycle flow and the PDG shortcut flow. - Included JSON input format examples and a few follow-up monitoring commands (e.g., validator info/status).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <summary>using Command-line Interface</summary> | ||
|
|
||
| ```bash | ||
| yarn start deposits write set-no-guarantor |
There was a problem hiding this comment.
The step describes setting a new guarantor address (setNodeOperatorGuarantor(newGuarantor)), but the CLI example doesn’t show how newGuarantor is provided. Please either add the missing address parameter to the command or explicitly note that the CLI will prompt / use a configured default so readers can reproduce the step non-interactively.
| yarn start deposits write set-no-guarantor | |
| yarn start deposits write set-no-guarantor <new_guarantor_address> | |
| # where <new_guarantor_address> is the address that will act as the Guarantor |
| <summary>using Command-line Interface</summary> | ||
|
|
||
| ```bash | ||
| yarn start deposits write set-no-depositor |
There was a problem hiding this comment.
This step is about assigning a new depositor (setNodeOperatorDepositor(newDepositor)), but the CLI command shown has no argument for newDepositor. Consider updating the example to include the depositor address (or document that it’s taken from config / prompted interactively).
| yarn start deposits write set-no-depositor | |
| yarn start deposits write set-no-depositor <depositor_address> |
| 4. The `Guarantor` tops up 1 ETH to the PDG contract, specifying the Node Operator's address. This serves as the predeposit guarantee collateral. | ||
| - Method called: `PredepositGuarantee.topUpNodeOperatorBalance(nodeOperator)` with ETH transfer. | ||
| - Caller must be specified as the `Guarantor` in the PredepositGuarantee contract. | ||
|
|
||
| <details> | ||
| <summary>using Command-line Interface</summary> | ||
|
|
||
| ```bash | ||
| yarn start deposits write top-up-no 1 -v <vault_address> | ||
| ``` |
There was a problem hiding this comment.
The text says the top-up specifies the Node Operator address (topUpNodeOperatorBalance(nodeOperator)), but the CLI example only includes an amount and vault address. Please clarify how the node operator address is determined (explicit flag vs derived from the vault vs config) to avoid ambiguous/incorrect execution.
| yarn start deposits write withdraw-no-balance 1 -v <vault_address> -r <recipient_address> | ||
| ``` | ||
|
|
There was a problem hiding this comment.
withdrawNodeOperatorBalance(nodeOperator, amount, recipient) requires identifying which node operator balance to withdraw, but the CLI example only passes amount and recipient. Please clarify how nodeOperator is selected (argument vs derived from vault/config), or include it explicitly in the command.
| yarn start deposits write withdraw-no-balance 1 -v <vault_address> -r <recipient_address> | |
| ``` | |
| yarn start deposits write withdraw-no-balance <node_operator_address> 1 -v <vault_address> -r <recipient_address> |
The <node_operator_address> argument corresponds to the nodeOperator parameter of withdrawNodeOperatorBalance and identifies which node operator's PDG balance to withdraw from.
| <details> | ||
| <summary>using Command-line Interface</summary> | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
The guide says roles must be granted via Dashboard.grantRole(role, account), but the CLI example doesn’t indicate which role(s) and which account are being granted. Please either show the full non-interactive command parameters or explicitly state that role-grant runs in interactive mode and what inputs it expects.
| ```bash | |
| ```bash | |
| # Runs in interactive mode and will prompt you for: | |
| # - The role to grant (e.g. NODE_OPERATOR_UNGUARANTEED_DEPOSIT_ROLE or NODE_OPERATOR_PROVE_UNKNOWN_VALIDATOR_ROLE) | |
| # - The recipient account address (the Depositor) |
| @@ -178,6 +413,18 @@ Steps: | |||
| - 8.1. The validator transitions from `NONE` to `ACTIVATED` stage in PDG. | |||
| - 8.2. The validator is now registered in PDG and can receive top-ups via `topUpExistingValidators()`. | |||
|
|
|||
| <details> | |||
| <summary>using Command-line Interface</summary> | |||
|
|
|||
| ```bash | |||
| # Check validator index if needed: | |||
| yarn start pdg-helpers validator-info <validator_pubkey> | |||
|
|
|||
| yarn start contracts dashboard write prove-unknown-validators-to-pdg <dashboard_address> <validator_index> | |||
| ``` | |||
There was a problem hiding this comment.
This step documents Dashboard.proveUnknownValidatorsToPDG(witnesses), but the CLI example suggests passing a validator_index instead of a witness. Please align the documentation with what the CLI actually sends (e.g., explain that the CLI fetches/builds the witness from the index) or update the example to reflect the on-chain API requirements.
Please, go through these steps before you request a review:
📝 Describe your changes
🔎 Attach a source of truth or evidence that allows reviewers to confirm the changes independently