Skip to content

feat: added solana manual withdrawal cli doc#819

Open
molok0aleks99 wants to merge 2 commits intomainfrom
feature/we-2272-add-solana-withdrawal-info-into-docs
Open

feat: added solana manual withdrawal cli doc#819
molok0aleks99 wants to merge 2 commits intomainfrom
feature/we-2272-add-solana-withdrawal-info-into-docs

Conversation

@molok0aleks99
Copy link

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

@molok0aleks99 molok0aleks99 requested a review from a team as a code owner February 25, 2026 11:56
TheDZhon
TheDZhon previously approved these changes Feb 25, 2026
@TheDZhon TheDZhon requested a review from vtrush88 February 25, 2026 12:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new operational guide to the docs explaining how to perform a manual stSOL withdrawal on Solana using the Solido CLI, including environment setup, transferring stSOL to a local keypair, running the withdrawal, and withdrawing SOL from the resulting stake account.

Changes:

  • Added a step-by-step Solana manual withdrawal CLI guide.
  • Documented environment setup (Rust, Solana CLI, Solido build) and a maintenance workaround for outdated exchange rate.
  • Added instructions for stake deactivation and final SOL withdrawal back to a main account.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +136 to +138
solana withdraw-stake **STAKE_ACCOUNT_PUBKEY** \
**MAIN_ACCOUNT_PUBKEY** SOL_AMOUNT \
--keypair **KEYPAIR_FILE**
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the final solana withdraw-stake example, the placeholders are wrapped in **...** inside a fenced bash block; markdown emphasis isn’t rendered in code fences, so users will literally copy the asterisks and the command will fail. Remove the ** formatting from the code block placeholders.

Suggested change
solana withdraw-stake **STAKE_ACCOUNT_PUBKEY** \
**MAIN_ACCOUNT_PUBKEY** SOL_AMOUNT \
--keypair **KEYPAIR_FILE**
solana withdraw-stake STAKE_ACCOUNT_PUBKEY \
MAIN_ACCOUNT_PUBKEY SOL_AMOUNT \
--keypair KEYPAIR_FILE

Copilot uses AI. Check for mistakes.
Comment on lines +99 to +103
1. **Execute the withdrawal** to your stake account:

```bash
./target/release/solido --config ./solido_config.json --keypair-path KEYPAIR_FILE withdraw --amount-st-sol STSOL_AMOUNT
```
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guide references solido_config.json but doesn’t explain where to get it (example file, how to generate it, or which fields must be set for mainnet). Without that, the copy/paste commands in section 3 aren’t reproducible.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,139 @@
# Solana manual withdraw with CLI
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title uses "manual withdraw"; in English this should be "manual withdrawal" (noun) to match the rest of the doc/CLI terminology.

Suggested change
# Solana manual withdraw with CLI
# Solana manual withdrawal with CLI

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +14
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
rustup override set 1.60.0
```
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustup override set 1.60.0 applies to the current directory; in these instructions it likely runs outside the cloned solido_v2 folder, so it won't reliably pin the toolchain for the build (and may set an override in the wrong place). Move the override step to after cd solido_v2 (or use rustup toolchain install 1.60.0 + a per-project override).

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +29
git clone --recurse-submodules -b V2.1 https://github.com/lidofinance/solido solido_v2
cd solido_v2
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section says to install "Solido CLI v2.1.0", but the clone command checks out -b V2.1 (a branch) rather than the v2.1.0 tag. Pin the git checkout to the exact release tag/commit referenced above to make the instructions reproducible.

Suggested change
git clone --recurse-submodules -b V2.1 https://github.com/lidofinance/solido solido_v2
cd solido_v2
git clone --recurse-submodules https://github.com/lidofinance/solido solido_v2
cd solido_v2
git checkout v2.1.0

Copilot uses AI. Check for mistakes.
./target/release/solido --config ./solido_config.json --keypair-path KEYPAIR_FILE withdraw --amount-st-sol STSOL_AMOUNT
```

⚠️ **Note**: if you're seeing the following error:
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor grammar: capitalize "If" after "⚠️ Note" for consistency with other notes.

Suggested change
⚠️ **Note**: if you're seeing the following error:
⚠️ **Note**: If you're seeing the following error:

Copilot uses AI. Check for mistakes.
Program log: The exchange rate is outdated, it was last computed in epoch 644, but now it is epoch 646.
```

Execute the following command to update the exchange rate
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add punctuation here (colon or period). As written, "Execute the following command to update the exchange rate" reads like an unfinished sentence.

Suggested change
Execute the following command to update the exchange rate
Execute the following command to update the exchange rate:

Copilot uses AI. Check for mistakes.
Execute the following command to update the exchange rate

```bash
./target/release/solido --config solido_config.json --keypair-path KEYPAIR_FILE perform-maintenance
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--config path is inconsistent across examples (here it uses solido_config.json, while the earlier withdraw command uses ./solido_config.json). Pick one form and use it consistently so users can copy/paste without guessing the config location.

Suggested change
./target/release/solido --config solido_config.json --keypair-path KEYPAIR_FILE perform-maintenance
./target/release/solido --config ./solido_config.json --keypair-path KEYPAIR_FILE perform-maintenance

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants