From b8eff3456c50558736fe2f3caea4ab98e0fc6370 Mon Sep 17 00:00:00 2001 From: Jack May Date: Mon, 20 Dec 2021 10:30:06 -0800 Subject: [PATCH] Update program close docs (#22026) --- docs/src/cli/deploy-a-program.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/src/cli/deploy-a-program.md b/docs/src/cli/deploy-a-program.md index 10f03625a..50996e9e4 100644 --- a/docs/src/cli/deploy-a-program.md +++ b/docs/src/cli/deploy-a-program.md @@ -152,42 +152,47 @@ Then issue a new `deploy` command and specify the buffer: solana program deploy --buffer ``` -### Closing buffer accounts and reclaiming their lamports +### Closing program and buffer accounts, and reclaiming their lamports + +Both program and buffer accounts can be closed and their lamport balances +transferred to a recipient's account. If deployment fails there will be a left over buffer account that holds lamports. The buffer account can either be used to [resume a -deploy](#resuming-a-failed-deploy) or closed. When closed, the full balance of -the buffer account will be transferred to the recipient's account. +deploy](#resuming-a-failed-deploy) or closed. -The buffer account's authority must be present to close a buffer account, to -list all the open buffer accounts that match the default authority: +The program or buffer account's authority must be present to close an account, +to list all the open program or buffer accounts that match the default +authority: ```bash +solana program show --programs solana program show --buffers ``` To specify a different authority: ```bash +solana program show --programs --buffer-authority solana program show --buffers --buffer-authority ``` To close a single account: ```bash -solana program close +solana program close ``` To close a single account and specify a different authority than the default: ```bash -solana program close --buffer-authority +solana program close
--buffer-authority ``` To close a single account and specify a different recipient than the default: ```bash -solana program close --recipient +solana program close
--recipient ``` To close all the buffer accounts associated with the current authority: